mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2025-01-19 00:06:16 +01:00
payBail
This commit is contained in:
parent
dd002746aa
commit
cfbf20f745
@ -613,6 +613,7 @@ public class Player implements FieldVisitor<Void>{
|
||||
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<Void>{
|
||||
|
||||
@Override
|
||||
public void payBail() {
|
||||
if (accountBalance >= 500) {
|
||||
pay(500);
|
||||
state = new ActiveState();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user