up to date for everybody (attempt 2)

This commit is contained in:
Valentine GIRAL 2025-05-09 10:51:38 +02:00
parent 1d3259c604
commit 139caf8c30
2 changed files with 2 additions and 1 deletions

View File

@ -10,7 +10,7 @@ public class Board {
private int turnNumber=0; // Tracks the number of turns elapsed private int turnNumber=0; // Tracks the number of turns elapsed
private boolean turnWhite=true; // True if it's White's turn, False if it's Black's turn private boolean turnWhite=true; // True if it's White's turn, False if it's Black's turn
private ArrayList<int[]> highlightedPositions = new ArrayList<>(); // List containing all board positions private ArrayList<int[]> highlightedPositions = new ArrayList<>(); // List containing all board positions
private ArrayList<MoveRecord> moveHistory = new ArrayList<>(); // Stack to store move history private ArrayList<MoveRecord> moveHistory = new ArrayList<>(); // List to store move history
private boolean inBounds(int x, int y) { private boolean inBounds(int x, int y) {
// Verify the bounds of the board // Verify the bounds of the board

View File

@ -1,6 +1,7 @@
package backend; package backend;
public class MoveRecord { public class MoveRecord {
// records the piece last move
Piece movedPiece; Piece movedPiece;
Piece capturedPiece; Piece capturedPiece;
int fromX, fromY, toX, toY; int fromX, fromY, toX, toY;