diff --git a/Projekte/monopoly/model/src/main/java/pp/monopoly/game/server/Player.java b/Projekte/monopoly/model/src/main/java/pp/monopoly/game/server/Player.java index 219cea0..8f5399a 100644 --- a/Projekte/monopoly/model/src/main/java/pp/monopoly/game/server/Player.java +++ b/Projekte/monopoly/model/src/main/java/pp/monopoly/game/server/Player.java @@ -11,6 +11,8 @@ import java.util.ArrayList; import java.util.List; import java.util.Random; +import javax.swing.JInternalFrame; + import com.jme3.network.serializing.Serializable; import pp.monopoly.message.server.BuyPropertyRequest; @@ -336,7 +338,6 @@ public class Player implements FieldVisitor{ @Override public Void visit(GulagField field) { - state = new JailState(); return null; } @@ -358,6 +359,7 @@ public class Player implements FieldVisitor{ @Override public Void visit(WacheField field) { setPosition(10); + jail(); return null; } @@ -386,6 +388,10 @@ public class Player implements FieldVisitor{ return properties; } + public void jail() { + state = new JailState(); + } + /** * Return the number of Properties of the speciefied fild type * @param field the type of field to search for diff --git a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/card/DeckHelper.java b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/card/DeckHelper.java index 7bca666..11df25f 100644 --- a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/card/DeckHelper.java +++ b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/card/DeckHelper.java @@ -243,10 +243,12 @@ public class DeckHelper{ private void schimmelGulak(Player player) { player.setPosition(10); + player.jail(); } private void partynachtGulak(Player player) { player.setPosition(10); + player.jail(); } private void jahresabschlussantreten(Player player) {