new method to get the last move to undo the last move after
This commit is contained in:
parent
f28e0e3af9
commit
2036a3d034
|
|
@ -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() {
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue