From 45d5637a12b1057511886280e792b0959fb463a6 Mon Sep 17 00:00:00 2001 From: fdai7551 Date: Thu, 2 Feb 2023 10:58:27 +0100 Subject: [PATCH] refactoring:[SnakeGame Class]: xCords5 ausgelagert --- .../gruppenprojekt/JavaGamelauncher/SnakeGame.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/JavaGamelauncher/src/main/java/de/hs_fulda/gruppenprojekt/JavaGamelauncher/SnakeGame.java b/JavaGamelauncher/src/main/java/de/hs_fulda/gruppenprojekt/JavaGamelauncher/SnakeGame.java index 1c92fec..7f3aad2 100644 --- a/JavaGamelauncher/src/main/java/de/hs_fulda/gruppenprojekt/JavaGamelauncher/SnakeGame.java +++ b/JavaGamelauncher/src/main/java/de/hs_fulda/gruppenprojekt/JavaGamelauncher/SnakeGame.java @@ -124,7 +124,7 @@ public class SnakeGame extends JFrame { cP.add(panel4); panel5 = new JPanel(); - panel5.setBounds(700, 0, 100, 100); + panel5.setBounds(xCords5, 0, 100, 100); panel5.setVisible(true); panel5.setBackground(Color.BLACK); @@ -166,7 +166,7 @@ public class SnakeGame extends JFrame { cP.add(panel10); panel11 = new JPanel(); - panel11.setBounds(700, 100, 100, 100); + panel11.setBounds(xCords5, 100, 100, 100); panel11.setVisible(true); panel11.setBackground(Color.BLACK); @@ -208,7 +208,7 @@ public class SnakeGame extends JFrame { cP.add(panel16); panel17 = new JPanel(); - panel17.setBounds(700, 200, 100, 100); + panel17.setBounds(xCords5, 200, 100, 100); panel17.setVisible(true); panel17.setBackground(Color.BLACK); @@ -250,7 +250,7 @@ public class SnakeGame extends JFrame { cP.add(panel22); panel23 = new JPanel(); - panel23.setBounds(700, 300, 100, 100); + panel23.setBounds(xCords5, 300, 100, 100); panel23.setVisible(true); panel23.setBackground(Color.BLACK); @@ -292,7 +292,7 @@ public class SnakeGame extends JFrame { cP.add(panel28); panel29 = new JPanel(); - panel29.setBounds(700, 400, 100, 100); + panel29.setBounds(xCords5, 400, 100, 100); panel29.setVisible(true); panel29.setBackground(Color.BLACK); @@ -334,7 +334,7 @@ public class SnakeGame extends JFrame { cP.add(panel34); panel35 = new JPanel(); - panel35.setBounds(700, 500, 100, 100); + panel35.setBounds(xCords5, 500, 100, 100); panel35.setVisible(true); panel35.setBackground(Color.BLACK);