diff --git a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/TestWorld.java b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/TestWorld.java index f55d672..04bdc2a 100644 --- a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/TestWorld.java +++ b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/TestWorld.java @@ -4,13 +4,14 @@ import java.util.List; import pp.monopoly.client.MonopolyApp; import pp.monopoly.client.gui.popups.BuyCard; +import pp.monopoly.client.gui.popups.EventCard; import pp.monopoly.client.gui.popups.FoodFieldCard; import pp.monopoly.client.gui.popups.GateFieldCard; import pp.monopoly.game.server.Player; import pp.monopoly.model.fields.BuildingProperty; import pp.monopoly.model.fields.FoodField; import pp.monopoly.model.fields.GateField; - +import pp.monopoly.notification.EventCardEvent; import pp.monopoly.notification.GameEventListener; import pp.monopoly.notification.PopUpEvent; @@ -33,7 +34,7 @@ public class TestWorld implements GameEventListener{ public TestWorld(MonopolyApp app, List players) { this.app = app; this.players = players; - app.getGameLogic().removeListener(this); + app.getGameLogic().addListener(this); } /** @@ -141,8 +142,10 @@ public class TestWorld implements GameEventListener{ } else if (fieldObject instanceof FoodField) { new FoodFieldCard(app).open(); } - - - + } + + @Override + public void receivedEvent(EventCardEvent event) { + new EventCard(app, event.description()).open(); } }