Browse Source

refactoring:[SnakeGame Class]: yCords6 ausgelagert

remotes/origin/SnakeGame
fdai7551 2 years ago
parent
commit
7636bf34cb
  1. 13
      JavaGamelauncher/src/main/java/de/hs_fulda/gruppenprojekt/JavaGamelauncher/SnakeGame.java

13
JavaGamelauncher/src/main/java/de/hs_fulda/gruppenprojekt/JavaGamelauncher/SnakeGame.java

@ -76,6 +76,7 @@ public class SnakeGame extends JFrame {
public int yCords3 = 200;
public int yCords4 = 300;
public int yCords5 = 400;
public int yCords6 = 500;
public static void main(String[] args) {
@ -312,42 +313,42 @@ public class SnakeGame extends JFrame {
cP.add(panel30);
panel31 = new JPanel();
panel31.setBounds(xCords1, 500, 100, 100);
panel31.setBounds(xCords1, yCords6, 100, 100);
panel31.setVisible(true);
panel31.setBackground(Color.BLACK);
cP.add(panel31);
panel32 = new JPanel();
panel32.setBounds(xCords2, 500, 100, 100);
panel32.setBounds(xCords2, yCords6, 100, 100);
panel32.setVisible(true);
panel32.setBackground(Color.BLACK);
cP.add(panel32);
panel33 = new JPanel();
panel33.setBounds(xCords3, 500, 100, 100);
panel33.setBounds(xCords3, yCords6, 100, 100);
panel33.setVisible(true);
panel33.setBackground(Color.BLACK);
cP.add(panel33);
panel34 = new JPanel();
panel34.setBounds(xCords4, 500, 100, 100);
panel34.setBounds(xCords4, yCords6, 100, 100);
panel34.setVisible(true);
panel34.setBackground(Color.BLACK);
cP.add(panel34);
panel35 = new JPanel();
panel35.setBounds(xCords5, 500, 100, 100);
panel35.setBounds(xCords5, yCords6, 100, 100);
panel35.setVisible(true);
panel35.setBackground(Color.BLACK);
cP.add(panel35);
panel36 = new JPanel();
panel36.setBounds(xCords6, 500, 100, 100);
panel36.setBounds(xCords6, yCords6, 100, 100);
panel36.setVisible(true);
panel36.setBackground(Color.BLACK);

Loading…
Cancel
Save