From 7636bf34cbf08c8764f55fbb50cb700fdf93b887 Mon Sep 17 00:00:00 2001 From: fdai7551 Date: Thu, 2 Feb 2023 11:25:23 +0100 Subject: [PATCH] refactoring:[SnakeGame Class]: yCords6 ausgelagert --- .../gruppenprojekt/JavaGamelauncher/SnakeGame.java | 13 +++++++------ 1 file changed, 7 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 5b1710f..00fbe77 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 @@ -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);