works but i cant place pieces after

This commit is contained in:
hugomanipoud2 2025-05-23 11:10:54 +02:00
parent a0d4ae6634
commit 11ba0933c3
1 changed files with 4 additions and 2 deletions

View File

@ -269,8 +269,10 @@ public class Board {
}
public void undoLastMove() {
//TODO
if (turnNb > 0) { // only if turnnb is positive
turnNb--; // decrease turnNb
pieces = boardHistory.get(turnNb); // replace the arraylist pieces with the one associated with last turn
}
}
public Board(Board board) {