implemented the correct transition, when the player can play no powercard
This commit is contained in:
@@ -5,6 +5,8 @@
|
|||||||
import pp.mdga.client.gamestate.TurnState;
|
import pp.mdga.client.gamestate.TurnState;
|
||||||
import pp.mdga.message.server.DieMessage;
|
import pp.mdga.message.server.DieMessage;
|
||||||
import pp.mdga.message.server.NoTurnMessage;
|
import pp.mdga.message.server.NoTurnMessage;
|
||||||
|
import pp.mdga.notification.DiceNowNotification;
|
||||||
|
import pp.mdga.notification.RollDiceNotification;
|
||||||
|
|
||||||
public class RollDiceState extends TurnStates {
|
public class RollDiceState extends TurnStates {
|
||||||
|
|
||||||
@@ -17,7 +19,7 @@ public RollDiceState(ClientState parent, ClientGameLogic logic) {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void enter() {
|
public void enter() {
|
||||||
|
logic.addNotification(new DiceNowNotification());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
public class ChoosePowerCardState extends PowerCardStates {
|
public class ChoosePowerCardState extends PowerCardStates {
|
||||||
|
|
||||||
private final PowerCardState parent;
|
private final PowerCardState parent;
|
||||||
private ArrayList<PowerCard> possibleCards;
|
private ArrayList<PowerCard> possibleCards = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
@@ -39,7 +39,6 @@ public ChoosePowerCardState(ClientState parent, ClientGameLogic logic) {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void enter() {
|
public void enter() {
|
||||||
possibleCards = new ArrayList<>();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -47,7 +46,7 @@ public void enter() {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void exit() {
|
public void exit() {
|
||||||
possibleCards = null;
|
possibleCards = new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user