From 3e70b3999fb7340f9b8b4b6844779fb8b9bd8568 Mon Sep 17 00:00:00 2001 From: keshi Date: Fri, 16 May 2025 14:53:03 +0200 Subject: [PATCH] updating the entire thing --- src/backend/Board.java | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/backend/Board.java b/src/backend/Board.java index 7125824..c4de5a4 100644 --- a/src/backend/Board.java +++ b/src/backend/Board.java @@ -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