fix undo draw check

This commit is contained in:
2025-04-14 11:02:35 +02:00
parent 07016be5d8
commit 91678a42b2
4 changed files with 33 additions and 5 deletions

View File

@@ -34,6 +34,7 @@ public class MoveCommand extends PlayerCommand {
case Moved:
outputSystem.onMove(this.move);
game.saveTraitPiecesPos();
return result;
case ActionNeeded:
@@ -83,6 +84,7 @@ public class MoveCommand extends PlayerCommand {
protected CommandResult undoImpl(Game game, GameListener outputSystem) {
final ChessBoard board = game.getBoard();
game.undoTraitPiecesPos();
board.undoMove(move, deadPiece);
return CommandResult.Moved;
}