mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2025-01-19 02:36:14 +01:00
payBail
This commit is contained in:
parent
dd002746aa
commit
cfbf20f745
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user