updating the entire thing

This commit is contained in:
keshi 2025-05-16 14:53:03 +02:00
parent 1aa23f6145
commit 3e70b3999f
1 changed files with 4 additions and 7 deletions

View File

@ -242,9 +242,6 @@ return false; }
return lastMove;
}
/**
* Reverts the board state back one move.
*/
@ -266,10 +263,10 @@ return false; }
}
// 3) Restore all other gamestate fields
this.chosenPiece = prev.chosenPiece;
this.turnNumber = prev.turnNumber;
this.isTurnWhite = prev.isTurnWhite;
this.lastMove = prev.lastMove;
this.chosenPiece = prev.chosenPiece;
this.turnNumber= prev.turnNumber;
this.isTurnWhite= prev.isTurnWhite;
this.lastMove= prev.lastMove;
this.highlightedSquares = new ArrayList<>(prev.highlightedSquares);
// 4) **Critical**: reset each Pieces own coordinates to match its array slot