From 9120e4d53cbd0f85a1bbfc0df27b78c232c15dd4 Mon Sep 17 00:00:00 2001 From: Johannes Schmelz Date: Mon, 25 Nov 2024 17:50:54 +0100 Subject: [PATCH] show test world when GameStart message is recieved --- .../java/pp/monopoly/client/GameAppState.java | 110 ++++++++++++++++++ .../java/pp/monopoly/client/MonopolyApp.java | 2 + .../monopoly/game/client/ClientGameLogic.java | 33 +++--- .../monopoly/game/server/ServerGameLogic.java | 4 +- .../message/server/NextPlayerTurn.java | 14 +-- .../model/fields/BuildingProperty.java | 9 ++ .../pp/monopoly/model/fields/EventField.java | 9 +- .../java/pp/monopoly/model/fields/Field.java | 10 +- .../pp/monopoly/model/fields/FieldColor.java | 6 + .../pp/monopoly/model/fields/FineField.java | 8 ++ .../pp/monopoly/model/fields/FoodField.java | 9 +- .../pp/monopoly/model/fields/GateField.java | 8 +- .../pp/monopoly/model/fields/GoField.java | 6 +- .../pp/monopoly/model/fields/GulagField.java | 4 +- .../monopoly/model/fields/PropertyField.java | 9 ++ .../model/fields/TestStreckeField.java | 3 + .../pp/monopoly/model/fields/WacheField.java | 5 +- .../pp/monopoly/server/MonopolyServer.java | 26 ++++- 18 files changed, 235 insertions(+), 40 deletions(-) create mode 100644 Projekte/monopoly/client/src/main/java/pp/monopoly/client/GameAppState.java diff --git a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/GameAppState.java b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/GameAppState.java new file mode 100644 index 0000000..48032e0 --- /dev/null +++ b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/GameAppState.java @@ -0,0 +1,110 @@ +//////////////////////////////////////// +// Programming project code +// UniBw M, 2022, 2023, 2024 +// www.unibw.de/inf2 +// (c) Mark Minas (mark.minas@unibw.de) +//////////////////////////////////////// + +package pp.monopoly.client; + +import com.jme3.input.controls.ActionListener; +import com.jme3.scene.Node; +import com.jme3.system.AppSettings; +import pp.monopoly.client.MonopolyAppState; +import pp.monopoly.client.gui.TestWorld; +import pp.monopoly.model.IntPoint; + +import java.lang.System.Logger; +import java.lang.System.Logger.Level; + +/** + * Represents the state responsible for managing the battle interface within the Battleship game. + * This state handles the display and interaction of the battle map, including the opponent's map. + * It manages GUI components, input events, and the layout of the interface when this state is enabled. + */ +public class GameAppState extends MonopolyAppState { + private static final Logger LOGGER = System.getLogger(MonopolyAppState.class.getName()); + private static final float DEPTH = 0f; + private static final float GAP = 20f; + + /** + * A listener for handling click events in the battle interface. + * When a click is detected, it triggers the corresponding actions on the opponent's map. + */ + private final ActionListener clickListener = (name, isPressed, tpf) -> click(isPressed); + + /** + * The root node for all GUI components in the battle state. + */ + private final Node battleNode = new Node("Game"); //NON-NLS + + /** + * A view representing the opponent's map in the GUI. + */ + private TestWorld testWorld; + + /** + * Enables the battle state by initializing, laying out, and adding GUI components. + * Attaches the components to the GUI node and registers input listeners. + */ + @Override + protected void enableState() { + battleNode.detachAllChildren(); + initializeGuiComponents(); + layoutGuiComponents(); + addGuiComponents(); + getApp().getGuiNode().attachChild(battleNode); + } + + /** + * Disables the battle state by removing GUI components and unregistering input listeners. + * Also handles cleanup of resources, such as the opponent's map view. + */ + @Override + protected void disableState() { + getApp().getGuiNode().detachChild(battleNode); + getApp().getInputManager().removeListener(clickListener); + } + + /** + * Initializes the GUI components used in the battle state. + * Creates the opponent's map view and adds a grid overlay to it. + */ + private void initializeGuiComponents() { + testWorld = new TestWorld(getApp()); + testWorld.initializeScene(); + } + + /** + * Adds the initialized GUI components to the battle node. + * Currently, it attaches the opponent's map view to the node. + */ + private void addGuiComponents() { + } + + /** + * Lays out the GUI components within the window, positioning them appropriately. + * The opponent's map view is positioned based on the window's dimensions and a specified gap. + */ + private void layoutGuiComponents() { + final AppSettings s = getApp().getContext().getSettings(); + final float windowWidth = s.getWidth(); + final float windowHeight = s.getHeight(); + } + + /** + * Handles click events in the battle interface. If the event indicates a click (not a release), + * it translates the cursor position to the model's coordinate system and triggers the game logic + * for interacting with the opponent's map. + * + * @param isPressed whether the mouse button is currently pressed (true) or released (false) + */ + private void click(boolean isPressed) { + } + + @Override + public void update(float tpf) { + testWorld.update(tpf); + super.update(tpf); + } +} 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 c58fa97..934890f 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 @@ -308,6 +308,7 @@ public class MonopolyApp extends SimpleApplication implements MonopolyClient, Ga attachGameSound(); attachGameMusic(); + stateManager.attach(new GameAppState()); } /** @@ -431,6 +432,7 @@ public class MonopolyApp extends SimpleApplication implements MonopolyClient, Ga */ @Override public void receivedEvent(ClientStateEvent event) { + stateManager.getState(GameAppState.class).setEnabled(true); } /** diff --git a/Projekte/monopoly/model/src/main/java/pp/monopoly/game/client/ClientGameLogic.java b/Projekte/monopoly/model/src/main/java/pp/monopoly/game/client/ClientGameLogic.java index 4467043..978b2e7 100644 --- a/Projekte/monopoly/model/src/main/java/pp/monopoly/game/client/ClientGameLogic.java +++ b/Projekte/monopoly/model/src/main/java/pp/monopoly/game/client/ClientGameLogic.java @@ -199,10 +199,10 @@ public class ClientGameLogic implements ServerInterpreter, GameEventBroker { @Override public void received(BuyPropertyResponse msg) { if (msg.isSuccessful()) { - setInfoText("You successfully bought " + msg.getPropertyName() + "!"); + playSound(Sound.MONEY_LOST); } else { - setInfoText("Unable to buy " + msg.getPropertyName() + ". Reason: " + msg.getReason()); + } } @@ -213,7 +213,7 @@ public class ClientGameLogic implements ServerInterpreter, GameEventBroker { */ @Override public void received(DiceResult msg) { - setInfoText("You rolled a " + msg.calcTotal() + "!"); + //Set the dice images playSound(Sound.DICE_ROLL); } @@ -225,7 +225,7 @@ public class ClientGameLogic implements ServerInterpreter, GameEventBroker { */ @Override public void received(EventDrawCard msg) { - setInfoText("Event card drawn: " + msg.getCardDescription()); + // Kartenlogik playSound(Sound.EVENT_CARD); } @@ -238,11 +238,11 @@ public class ClientGameLogic implements ServerInterpreter, GameEventBroker { @Override public void received(GameOver msg) { if (msg.isWinner()) { - setInfoText("Congratulations! You have won the game!"); + //Winner popup playSound(Sound.WINNER); } else { - setInfoText("Game over. Better luck next time!"); + // Looser popup playSound(Sound.LOSER); } @@ -256,8 +256,8 @@ public class ClientGameLogic implements ServerInterpreter, GameEventBroker { @Override public void received(GameStart msg) { players = msg.getPlayers(); - setInfoText("The game has started! Good luck!"); setState(new WaitForTurnState(this)); + } /** @@ -268,10 +268,10 @@ public class ClientGameLogic implements ServerInterpreter, GameEventBroker { @Override public void received(JailEvent msg) { if (msg.isGoingToJail()) { - setInfoText("You are sent to jail!"); + playSound(Sound.GULAG); } else { - setInfoText("You are out of jail!"); + } } @@ -283,7 +283,7 @@ public class ClientGameLogic implements ServerInterpreter, GameEventBroker { @Override public void received(PlayerStatusUpdate msg) { - setInfoText("Player " + msg.getPlayerName() + " status updated: " + msg.getStatus()); + } /** @@ -293,7 +293,7 @@ public class ClientGameLogic implements ServerInterpreter, GameEventBroker { */ @Override public void received(TimeOutWarning msg) { - setInfoText("Warning! Time is running out. You have " + msg.getRemainingTime() + " seconds left."); + } /** @@ -303,7 +303,7 @@ public class ClientGameLogic implements ServerInterpreter, GameEventBroker { */ @Override public void received(ViewAssetsResponse msg) { - setInfoText("Your current assets are being displayed."); + } /** @@ -314,10 +314,10 @@ public class ClientGameLogic implements ServerInterpreter, GameEventBroker { @Override public void received(TradeReply msg) { if (msg.getTradeHandler().getStatus()) { - setInfoText("Trade accepted by " + msg.getTradeHandler().getReceiver().getName() + "."); + playSound(Sound.TRADE_ACCEPTED); } else { - setInfoText("Trade rejected by " + msg.getTradeHandler().getReceiver().getName() + "."); + playSound(Sound.TRADE_REJECTED); } } @@ -329,7 +329,7 @@ public class ClientGameLogic implements ServerInterpreter, GameEventBroker { */ @Override public void received(TradeRequest msg) { - setInfoText("Trade offer received from " + msg.getTradeHandler().getSender().getName()); + // playSound(Sound.TRADE_REQUEST); no sound effect // notifyListeners(); } @@ -341,7 +341,8 @@ public class ClientGameLogic implements ServerInterpreter, GameEventBroker { */ @Override public void received(NextPlayerTurn msg) { - setInfoText("It's your turn!"); + + System.out.println("Du bsit am zug message empfangen"); setState(new ActiveState(this)); } } diff --git a/Projekte/monopoly/model/src/main/java/pp/monopoly/game/server/ServerGameLogic.java b/Projekte/monopoly/model/src/main/java/pp/monopoly/game/server/ServerGameLogic.java index a901fac..d87d163 100644 --- a/Projekte/monopoly/model/src/main/java/pp/monopoly/game/server/ServerGameLogic.java +++ b/Projekte/monopoly/model/src/main/java/pp/monopoly/game/server/ServerGameLogic.java @@ -175,7 +175,7 @@ public class ServerGameLogic implements ClientInterpreter { LOGGER.log(Level.DEBUG, "Ending turn for player {0}", player.getName()); Player next = playerHandler.nextPlayer(); next.setActive(); - send(next, new NextPlayerTurn(next)); + send(next, new NextPlayerTurn()); } } } @@ -207,7 +207,7 @@ public class ServerGameLogic implements ClientInterpreter { send(p, new GameStart(playerHandler.getPlayers())); } playerHandler.randomOrder(); - send(playerHandler.getPlayerAtIndex(0), new NextPlayerTurn(playerHandler.getPlayerAtIndex(0))); + send(playerHandler.getPlayerAtIndex(0), new NextPlayerTurn()); } } diff --git a/Projekte/monopoly/model/src/main/java/pp/monopoly/message/server/NextPlayerTurn.java b/Projekte/monopoly/model/src/main/java/pp/monopoly/message/server/NextPlayerTurn.java index d0f5a18..b2e5c85 100644 --- a/Projekte/monopoly/model/src/main/java/pp/monopoly/message/server/NextPlayerTurn.java +++ b/Projekte/monopoly/model/src/main/java/pp/monopoly/message/server/NextPlayerTurn.java @@ -2,20 +2,13 @@ package pp.monopoly.message.server; import com.jme3.network.serializing.Serializable; -import pp.monopoly.game.server.Player; - @Serializable public class NextPlayerTurn extends ServerMessage{ - private Player player; - /** * Default constructor for serialization purposes. */ - private NextPlayerTurn() { /* empty */ } - - public NextPlayerTurn(Player player) { - this.player = player; + public NextPlayerTurn() { } @Override @@ -28,9 +21,4 @@ public class NextPlayerTurn extends ServerMessage{ // TODO Auto-generated method stub throw new UnsupportedOperationException("Unimplemented method 'getInfoTextKey'"); } - - public Player getPlayer() { - return player; - } - } diff --git a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/BuildingProperty.java b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/BuildingProperty.java index 118d0ed..1048e2b 100644 --- a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/BuildingProperty.java +++ b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/BuildingProperty.java @@ -3,8 +3,11 @@ package pp.monopoly.model.fields; import java.util.ArrayList; import java.util.List; +import com.jme3.network.serializing.Serializable; + import pp.monopoly.game.server.Player; +@Serializable public class BuildingProperty extends PropertyField { private int houses; @@ -17,6 +20,12 @@ public class BuildingProperty extends PropertyField { private final int rentFactor4 = 55; private final int rentFactorHotel = 70; + private BuildingProperty(){ + super("", 0, 0, 0); + this.housePrice = 0; + this.color = null; + } + BuildingProperty(String name, int id, int price, int rent, int housePrice, FieldColor color) { super(name, id, price, rent); this.housePrice = housePrice; diff --git a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/EventField.java b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/EventField.java index cad2dde..9d9075a 100644 --- a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/EventField.java +++ b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/EventField.java @@ -1,11 +1,18 @@ package pp.monopoly.model.fields; +import com.jme3.network.serializing.Serializable; + import pp.monopoly.game.server.Player; +@Serializable public class EventField extends Field{ - public EventField(String name, int id) { + private EventField() { + super("", 0); + } + + EventField(String name, int id) { super(name, id); } diff --git a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/Field.java b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/Field.java index 0baa044..28eec0c 100644 --- a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/Field.java +++ b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/Field.java @@ -1,11 +1,19 @@ package pp.monopoly.model.fields; +import com.jme3.network.serializing.Serializable; + import pp.monopoly.game.server.Player; -abstract class Field { +@Serializable +public abstract class Field { protected final String name; protected final int id; + private Field() { + this.name = ""; + this.id = 0; + } + protected Field(String name, int id) { this.name = name; this.id= id; diff --git a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/FieldColor.java b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/FieldColor.java index f0a9bd0..0b14722 100644 --- a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/FieldColor.java +++ b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/FieldColor.java @@ -1,10 +1,12 @@ package pp.monopoly.model.fields; import com.jme3.math.ColorRGBA; +import com.jme3.network.serializing.Serializable; /** * Enum representing eight distinct colors for properties in the game. */ +// @Serializable public enum FieldColor { BROWN(new ColorRGBA(148 / 255f, 86 / 255f, 57 / 255f, 1)), GREEN(new ColorRGBA(30 / 255f, 179 / 255f, 90 / 255f, 1)), @@ -17,6 +19,10 @@ public enum FieldColor { private final ColorRGBA color; + private FieldColor() { + this.color = null; + } + /** * Constructs a FieldColor with the specified ColorRGBA value. * diff --git a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/FineField.java b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/FineField.java index 8429394..db98a29 100644 --- a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/FineField.java +++ b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/FineField.java @@ -1,11 +1,19 @@ package pp.monopoly.model.fields; +import com.jme3.network.serializing.Serializable; + import pp.monopoly.game.server.Player; +@Serializable public class FineField extends Field{ private final int fine; + private FineField() { + super("", 0); + this.fine = 0; + } + FineField(String name, int id, int fine) { super(name, id); this.fine = fine; diff --git a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/FoodField.java b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/FoodField.java index a3f0abf..4d23a89 100644 --- a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/FoodField.java +++ b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/FoodField.java @@ -1,10 +1,17 @@ package pp.monopoly.model.fields; +import com.jme3.network.serializing.Serializable; + import pp.monopoly.game.server.Player; +@Serializable public class FoodField extends PropertyField { - public FoodField(String name, int id) { + private FoodField() { + super("", 0, 0, 0); + } + + FoodField(String name, int id) { super(name, id, 1500,0); } diff --git a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/GateField.java b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/GateField.java index ce04a4c..d56f65c 100644 --- a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/GateField.java +++ b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/GateField.java @@ -1,9 +1,15 @@ package pp.monopoly.model.fields; -import pp.monopoly.game.server.Player; +import com.jme3.network.serializing.Serializable; +import pp.monopoly.game.server.Player; +@Serializable public class GateField extends PropertyField{ + private GateField() { + super("", 0, 0, 0); + } + GateField(String name, int id) { super(name, id, 2000, 25); } diff --git a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/GoField.java b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/GoField.java index 09c6c58..785e6b2 100644 --- a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/GoField.java +++ b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/GoField.java @@ -1,10 +1,12 @@ package pp.monopoly.model.fields; -import pp.monopoly.game.server.Player; +import com.jme3.network.serializing.Serializable; +import pp.monopoly.game.server.Player; +@Serializable public class GoField extends Field{ - public GoField() { + GoField() { super("Monatsgehalt", 0); } diff --git a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/GulagField.java b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/GulagField.java index 08c3a2c..278d9e1 100644 --- a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/GulagField.java +++ b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/GulagField.java @@ -1,7 +1,9 @@ package pp.monopoly.model.fields; -import pp.monopoly.game.server.Player; +import com.jme3.network.serializing.Serializable; +import pp.monopoly.game.server.Player; +@Serializable public class GulagField extends Field{ private int bailCost = 500; diff --git a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/PropertyField.java b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/PropertyField.java index 8f89831..c9d1a3c 100644 --- a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/PropertyField.java +++ b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/PropertyField.java @@ -1,11 +1,14 @@ package pp.monopoly.model.fields; +import com.jme3.network.serializing.Serializable; + import pp.monopoly.game.server.Player; /** * Represents an abstract property field in the Monopoly game. * Contains attributes related to ownership, price, rent, and mortgage status. */ +@Serializable public abstract class PropertyField extends Field { private final int price; @@ -13,6 +16,12 @@ public abstract class PropertyField extends Field { private Player owner; private boolean mortgaged = false; + private PropertyField() { + super("", 0); + this.price = 0; + this.rent = 0; + } + /** * Constructs a PropertyField with the specified name, ID, price, and rent. * diff --git a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/TestStreckeField.java b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/TestStreckeField.java index 1ea6ae7..d446f10 100644 --- a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/TestStreckeField.java +++ b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/TestStreckeField.java @@ -1,7 +1,10 @@ package pp.monopoly.model.fields; +import com.jme3.network.serializing.Serializable; + import pp.monopoly.game.server.Player; +@Serializable public class TestStreckeField extends Field{ private int money; diff --git a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/WacheField.java b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/WacheField.java index ca0abaf..02f3511 100644 --- a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/WacheField.java +++ b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/WacheField.java @@ -1,10 +1,13 @@ package pp.monopoly.model.fields; +import com.jme3.network.serializing.Serializable; + import pp.monopoly.game.server.Player; +@Serializable public class WacheField extends Field{ - public WacheField() { + WacheField() { super("Wache", 30); } diff --git a/Projekte/monopoly/server/src/main/java/pp/monopoly/server/MonopolyServer.java b/Projekte/monopoly/server/src/main/java/pp/monopoly/server/MonopolyServer.java index 4c1b56d..d373e64 100644 --- a/Projekte/monopoly/server/src/main/java/pp/monopoly/server/MonopolyServer.java +++ b/Projekte/monopoly/server/src/main/java/pp/monopoly/server/MonopolyServer.java @@ -43,6 +43,18 @@ import pp.monopoly.message.server.ServerMessage; import pp.monopoly.model.Figure; import pp.monopoly.model.IntPoint; import pp.monopoly.model.LimitedLinkedList; +import pp.monopoly.model.fields.BuildingProperty; +import pp.monopoly.model.fields.EventField; +import pp.monopoly.model.fields.Field; +import pp.monopoly.model.fields.FieldColor; +import pp.monopoly.model.fields.FineField; +import pp.monopoly.model.fields.FoodField; +import pp.monopoly.model.fields.GateField; +import pp.monopoly.model.fields.GoField; +import pp.monopoly.model.fields.GulagField; +import pp.monopoly.model.fields.PropertyField; +import pp.monopoly.model.fields.TestStreckeField; +import pp.monopoly.model.fields.WacheField; /** * Server implementing the visitor pattern as MessageReceiver for ClientMessages @@ -129,7 +141,19 @@ public class MonopolyServer implements MessageListener, Connec Serializer.registerClass(NextPlayerTurn.class); Serializer.registerClass(Player.class); Serializer.registerClass(Figure.class); - Serializer.registerClass(PlayerHandler.class); + // Serializer.registerClass(PlayerHandler.class); + // Serializer.registerClass(BuildingProperty.class); + // Serializer.registerClass(EventField.class); + // Serializer.registerClass(Field.class); + // // Serializer.registerClass(FieldColor.class); + // Serializer.registerClass(FineField.class); + // Serializer.registerClass(FoodField.class); + // Serializer.registerClass(GateField.class); + // Serializer.registerClass(GoField.class); + // Serializer.registerClass(GulagField.class); + // Serializer.registerClass(PropertyField.class); + // Serializer.registerClass(TestStreckeField.class); + // Serializer.registerClass(WacheField.class); } private void registerListeners() {