updating the entire thing
This commit is contained in:
parent
1aa23f6145
commit
3e70b3999f
|
|
@ -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 game‐state 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 Piece’s own coordinates to match its array slot
|
||||
|
|
|
|||
Loading…
Reference in New Issue