new method to get the last move to undo the last move after

This commit is contained in:
clara 2025-05-13 15:47:15 +02:00
parent f28e0e3af9
commit 2036a3d034
1 changed files with 6 additions and 1 deletions

View File

@ -262,7 +262,12 @@ public class Board {
return false;
}
public void undoLastMove() {
public void getLastMove (int x, int y) {// it saves the current state before making a move
previousStates.add(new Board(this)); // Use the existing constructor to create a copy
}
public void undoLastMove() {
}