From cfbf20f74549acb61287bd234e806b0195b5e280 Mon Sep 17 00:00:00 2001 From: Johannes Schmelz Date: Sun, 1 Dec 2024 20:55:58 +0100 Subject: [PATCH] payBail --- .../model/src/main/java/pp/monopoly/game/server/Player.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 920b8fe..b3cd33b 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 @@ -613,6 +613,7 @@ public class Player implements FieldVisitor{ remainingAttempts--; if (remainingAttempts <= 0) { handler.getLogic().send(Player.this, new NotificationMessage("jailpay")); + if(getOutOfJailCard == 0) payBail(); } else { handler.getLogic().send(Player.this, new NotificationMessage("jailtryagain")); } @@ -623,10 +624,8 @@ public class Player implements FieldVisitor{ @Override public void payBail() { - if (accountBalance >= 500) { pay(500); state = new ActiveState(); - } } @Override