fixed some tests

This commit is contained in:
Benjamin Feyer
2024-12-11 17:13:59 +01:00
parent d8816be811
commit 62e3dd7932
4 changed files with 76 additions and 30 deletions

View File

@@ -85,4 +85,13 @@ public void selectAnimationEnd(){
logic.addNotification(new ActivePlayerNotification(logic.getGame().getActiveColor()));
}
}
/**
* this method is used to return the animationCounter
*
* @return int animationCounter
*/
public int getAnimationCounter(){
return animationCounter;
}
}

View File

@@ -78,6 +78,7 @@ public void received(AnimationEndMessage msg, int from) {
} else if (!isDied){
LOGGER.log(System.Logger.Level.INFO, "Received AnimationEndMessage without the active player rolling a die.");
} else if (!moveablePieces.isEmpty()) {
System.out.println(!moveablePieces.isEmpty());
this.logic.getServerSender().send(this.logic.getGame().getActivePlayerId(), new ChoosePieceStateMessage());
this.rollDiceAutomaton.getTurnAutomaton().setCurrentState(this.rollDiceAutomaton.getTurnAutomaton().getChoosePieceState());
} else {
@@ -89,4 +90,13 @@ public void received(AnimationEndMessage msg, int from) {
}
}
}
/**
* sets the movabelPieces
*
* @param moveablePieces
*/
public void setMoveablePieces(List<Piece> moveablePieces) {
this.moveablePieces = moveablePieces;
}
}