From 9428c1496d42f778e1aed32098e076d6bf3fd27e Mon Sep 17 00:00:00 2001 From: fdai7551 Date: Thu, 2 Feb 2023 11:00:06 +0100 Subject: [PATCH] refactoring:[SnakeGame Class]: xCords6 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 7f3aad2..a0cee8f 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 @@ -131,7 +131,7 @@ public class SnakeGame extends JFrame { cP.add(panel5); panel6 = new JPanel(); - panel6.setBounds(800, 0, 100, 100); + panel6.setBounds(xCords6, 0, 100, 100); panel6.setVisible(true); panel6.setBackground(Color.BLACK); @@ -173,7 +173,7 @@ public class SnakeGame extends JFrame { cP.add(panel11); panel12 = new JPanel(); - panel12.setBounds(800, 100, 100, 100); + panel12.setBounds(xCords6, 100, 100, 100); panel12.setVisible(true); panel12.setBackground(Color.BLACK); @@ -215,7 +215,7 @@ public class SnakeGame extends JFrame { cP.add(panel17); panel18 = new JPanel(); - panel18.setBounds(800, 200, 100, 100); + panel18.setBounds(xCords6, 200, 100, 100); panel18.setVisible(true); panel18.setBackground(Color.BLACK); @@ -257,7 +257,7 @@ public class SnakeGame extends JFrame { cP.add(panel23); panel24 = new JPanel(); - panel24.setBounds(800, 300, 100, 100); + panel24.setBounds(xCords6, 300, 100, 100); panel24.setVisible(true); panel24.setBackground(Color.BLACK); @@ -299,7 +299,7 @@ public class SnakeGame extends JFrame { cP.add(panel29); panel30 = new JPanel(); - panel30.setBounds(800, 400, 100, 100); + panel30.setBounds(xCords6, 400, 100, 100); panel30.setVisible(true); panel30.setBackground(Color.BLACK); @@ -341,7 +341,7 @@ public class SnakeGame extends JFrame { cP.add(panel35); panel36 = new JPanel(); - panel36.setBounds(800, 500, 100, 100); + panel36.setBounds(xCords6, 500, 100, 100); panel36.setVisible(true); panel36.setBackground(Color.BLACK);