Browse Source

refactoring:[SnakeGame Class]: yCords5 ausgelagert

remotes/origin/SnakeGame
fdai7551 2 years ago
parent
commit
0ef9f4c2bc
  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

@ -75,6 +75,7 @@ public class SnakeGame extends JFrame {
public int yCords2 = 100; public int yCords2 = 100;
public int yCords3 = 200; public int yCords3 = 200;
public int yCords4 = 300; public int yCords4 = 300;
public int yCords5 = 400;
public static void main(String[] args) { public static void main(String[] args) {
@ -269,42 +270,42 @@ public class SnakeGame extends JFrame {
cP.add(panel24); cP.add(panel24);
panel25 = new JPanel(); panel25 = new JPanel();
panel25.setBounds(xCords1, 400, 100, 100);
panel25.setBounds(xCords1, yCords5, 100, 100);
panel25.setVisible(true); panel25.setVisible(true);
panel25.setBackground(Color.BLACK); panel25.setBackground(Color.BLACK);
cP.add(panel25); cP.add(panel25);
panel26 = new JPanel(); panel26 = new JPanel();
panel26.setBounds(xCords2, 400, 100, 100);
panel26.setBounds(xCords2, yCords5, 100, 100);
panel26.setVisible(true); panel26.setVisible(true);
panel26.setBackground(Color.BLACK); panel26.setBackground(Color.BLACK);
cP.add(panel26); cP.add(panel26);
panel27 = new JPanel(); panel27 = new JPanel();
panel27.setBounds(xCords3, 400, 100, 100);
panel27.setBounds(xCords3, yCords5, 100, 100);
panel27.setVisible(true); panel27.setVisible(true);
panel27.setBackground(Color.BLACK); panel27.setBackground(Color.BLACK);
cP.add(panel27); cP.add(panel27);
panel28 = new JPanel(); panel28 = new JPanel();
panel28.setBounds(xCords4, 400, 100, 100);
panel28.setBounds(xCords4, yCords5, 100, 100);
panel28.setVisible(true); panel28.setVisible(true);
panel28.setBackground(Color.BLACK); panel28.setBackground(Color.BLACK);
cP.add(panel28); cP.add(panel28);
panel29 = new JPanel(); panel29 = new JPanel();
panel29.setBounds(xCords5, 400, 100, 100);
panel29.setBounds(xCords5, yCords5, 100, 100);
panel29.setVisible(true); panel29.setVisible(true);
panel29.setBackground(Color.BLACK); panel29.setBackground(Color.BLACK);
cP.add(panel29); cP.add(panel29);
panel30 = new JPanel(); panel30 = new JPanel();
panel30.setBounds(xCords6, 400, 100, 100);
panel30.setBounds(xCords6, yCords5, 100, 100);
panel30.setVisible(true); panel30.setVisible(true);
panel30.setBackground(Color.BLACK); panel30.setBackground(Color.BLACK);

Loading…
Cancel
Save