This commit is contained in:
Johannes Schmelz 2024-12-01 20:55:58 +01:00
parent dd002746aa
commit cfbf20f745

View File

@ -613,6 +613,7 @@ public class Player implements FieldVisitor<Void>{
remainingAttempts--; remainingAttempts--;
if (remainingAttempts <= 0) { if (remainingAttempts <= 0) {
handler.getLogic().send(Player.this, new NotificationMessage("jailpay")); handler.getLogic().send(Player.this, new NotificationMessage("jailpay"));
if(getOutOfJailCard == 0) payBail();
} else { } else {
handler.getLogic().send(Player.this, new NotificationMessage("jailtryagain")); handler.getLogic().send(Player.this, new NotificationMessage("jailtryagain"));
} }
@ -623,10 +624,8 @@ public class Player implements FieldVisitor<Void>{
@Override @Override
public void payBail() { public void payBail() {
if (accountBalance >= 500) {
pay(500); pay(500);
state = new ActiveState(); state = new ActiveState();
}
} }
@Override @Override