fixed jailState

This commit is contained in:
Johannes Schmelz 2024-11-29 19:21:27 +01:00
parent afa2ebd004
commit fba82f670b
2 changed files with 9 additions and 1 deletions

View File

@ -11,6 +11,8 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Random; import java.util.Random;
import javax.swing.JInternalFrame;
import com.jme3.network.serializing.Serializable; import com.jme3.network.serializing.Serializable;
import pp.monopoly.message.server.BuyPropertyRequest; import pp.monopoly.message.server.BuyPropertyRequest;
@ -336,7 +338,6 @@ public class Player implements FieldVisitor<Void>{
@Override @Override
public Void visit(GulagField field) { public Void visit(GulagField field) {
state = new JailState();
return null; return null;
} }
@ -358,6 +359,7 @@ public class Player implements FieldVisitor<Void>{
@Override @Override
public Void visit(WacheField field) { public Void visit(WacheField field) {
setPosition(10); setPosition(10);
jail();
return null; return null;
} }
@ -386,6 +388,10 @@ public class Player implements FieldVisitor<Void>{
return properties; return properties;
} }
public void jail() {
state = new JailState();
}
/** /**
* Return the number of Properties of the speciefied fild type * Return the number of Properties of the speciefied fild type
* @param field the type of field to search for * @param field the type of field to search for

View File

@ -243,10 +243,12 @@ public class DeckHelper{
private void schimmelGulak(Player player) { private void schimmelGulak(Player player) {
player.setPosition(10); player.setPosition(10);
player.jail();
} }
private void partynachtGulak(Player player) { private void partynachtGulak(Player player) {
player.setPosition(10); player.setPosition(10);
player.jail();
} }
private void jahresabschlussantreten(Player player) { private void jahresabschlussantreten(Player player) {