updating the entire thing
This commit is contained in:
parent
1aa23f6145
commit
3e70b3999f
|
|
@ -242,9 +242,6 @@ return false; }
|
||||||
return lastMove;
|
return lastMove;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reverts the board state back one move.
|
* Reverts the board state back one move.
|
||||||
*/
|
*/
|
||||||
|
|
@ -266,10 +263,10 @@ return false; }
|
||||||
}
|
}
|
||||||
|
|
||||||
// 3) Restore all other game‐state fields
|
// 3) Restore all other game‐state fields
|
||||||
this.chosenPiece = prev.chosenPiece;
|
this.chosenPiece = prev.chosenPiece;
|
||||||
this.turnNumber = prev.turnNumber;
|
this.turnNumber= prev.turnNumber;
|
||||||
this.isTurnWhite = prev.isTurnWhite;
|
this.isTurnWhite= prev.isTurnWhite;
|
||||||
this.lastMove = prev.lastMove;
|
this.lastMove= prev.lastMove;
|
||||||
this.highlightedSquares = new ArrayList<>(prev.highlightedSquares);
|
this.highlightedSquares = new ArrayList<>(prev.highlightedSquares);
|
||||||
|
|
||||||
// 4) **Critical**: reset each Piece’s own coordinates to match its array slot
|
// 4) **Critical**: reset each Piece’s own coordinates to match its array slot
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue