From 44c55ce3a6829a18fffd96a1fd806a05e9023305 Mon Sep 17 00:00:00 2001 From: Johannes Schmelz Date: Sat, 23 Nov 2024 17:42:51 +0100 Subject: [PATCH] refactor --- .../src/main/java/pp/monopoly/client/MonopolyApp.java | 9 ++++++--- .../client/gui/{ => popups}/BuildingPropertyCard.java | 2 +- .../gui/{FoodField.java => popups/FoodFieldCard.java} | 6 +++--- .../gui/{GateField.java => popups/GateFieldCard.java} | 6 +++--- 4 files changed, 13 insertions(+), 10 deletions(-) rename Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/{ => popups}/BuildingPropertyCard.java (99%) rename Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/{FoodField.java => popups/FoodFieldCard.java} (97%) rename Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/{GateField.java => popups/GateFieldCard.java} (97%) diff --git a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/MonopolyApp.java b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/MonopolyApp.java index 6cb01ff..060fbda 100644 --- a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/MonopolyApp.java +++ b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/MonopolyApp.java @@ -17,7 +17,10 @@ import pp.dialog.DialogBuilder; import pp.dialog.DialogManager; import pp.graphics.Draw; import pp.monopoly.client.gui.*; +import pp.monopoly.client.gui.popups.BuildingPropertyCard; import pp.monopoly.client.gui.popups.BuyCard; +import pp.monopoly.client.gui.popups.FoodFieldCard; +import pp.monopoly.client.gui.popups.GateFieldCard; import pp.monopoly.game.client.ClientGameLogic; import pp.monopoly.game.client.MonopolyClient; import pp.monopoly.game.client.ServerConnection; @@ -47,8 +50,8 @@ public class MonopolyApp extends SimpleApplication implements MonopolyClient, Ga // TODO Temp später entfernen private BuildingPropertyCard buildingProperty; - private FoodField foodField; - private GateField gateField; + private FoodFieldCard foodField; + private GateFieldCard gateField; private BuyCard buyCard; private boolean isBuyCardPopupOpen = false; private final ActionListener BListener = (name, isPressed, tpf) -> handleB(isPressed); @@ -166,7 +169,7 @@ public class MonopolyApp extends SimpleApplication implements MonopolyClient, Ga } else { // Öffne das SettingsMenu System.out.println("Öffne BuyCardPopup..."); - gateField = new GateField(this); + gateField = new GateFieldCard(this); gateField.open(); setBuyCardPopupOpen(true); } diff --git a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/BuildingPropertyCard.java b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/popups/BuildingPropertyCard.java similarity index 99% rename from Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/BuildingPropertyCard.java rename to Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/popups/BuildingPropertyCard.java index e13edb0..c619294 100644 --- a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/BuildingPropertyCard.java +++ b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/popups/BuildingPropertyCard.java @@ -1,4 +1,4 @@ -package pp.monopoly.client.gui; +package pp.monopoly.client.gui.popups; import com.jme3.material.Material; import com.jme3.material.RenderState.BlendMode; diff --git a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/FoodField.java b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/popups/FoodFieldCard.java similarity index 97% rename from Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/FoodField.java rename to Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/popups/FoodFieldCard.java index a45135b..7243d4a 100644 --- a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/FoodField.java +++ b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/popups/FoodFieldCard.java @@ -1,4 +1,4 @@ -package pp.monopoly.client.gui; +package pp.monopoly.client.gui.popups; import com.jme3.material.Material; import com.jme3.material.RenderState.BlendMode; @@ -16,13 +16,13 @@ import pp.monopoly.client.MonopolyApp; /** * SettingsMenu ist ein Overlay-Menü, das durch ESC aufgerufen werden kann. */ -public class FoodField extends Dialog { +public class FoodFieldCard extends Dialog { private final MonopolyApp app; private final Geometry overlayBackground; private final Container settingsContainer; private final Container backgroundContainer; - public FoodField(MonopolyApp app) { + public FoodFieldCard(MonopolyApp app) { super(app.getDialogManager()); this.app = app; diff --git a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/GateField.java b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/popups/GateFieldCard.java similarity index 97% rename from Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/GateField.java rename to Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/popups/GateFieldCard.java index db9e7d4..51f1fd5 100644 --- a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/GateField.java +++ b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/popups/GateFieldCard.java @@ -1,4 +1,4 @@ -package pp.monopoly.client.gui; +package pp.monopoly.client.gui.popups; import com.jme3.material.Material; import com.jme3.material.RenderState.BlendMode; @@ -16,13 +16,13 @@ import pp.monopoly.client.MonopolyApp; /** * SettingsMenu ist ein Overlay-Menü, das durch ESC aufgerufen werden kann. */ -public class GateField extends Dialog { +public class GateFieldCard extends Dialog { private final MonopolyApp app; private final Geometry overlayBackground; private final Container settingsContainer; private final Container backgroundContainer; - public GateField(MonopolyApp app) { + public GateFieldCard(MonopolyApp app) { super(app.getDialogManager()); this.app = app;