final working board

This commit is contained in:
Marleen PETERSON 2025-04-15 11:51:07 +02:00
parent c697d8e642
commit e50a933874
1 changed files with 20 additions and 9 deletions

View File

@ -66,9 +66,9 @@ public class Board {
} }
public void cleanBoard() { public void cleanBoard() {
for (int y = 0; y < getHeight(); y++) { for (int y = 0; y < getHeight(); y++) { //each column
for (int x = 0; x < getWidth(); x++) { for (int x = 0; x < getWidth(); x++) { //each row
board[y][x] = null; board[y][x] = null; //starts at 0,0
} }
} }
selectedPiece = null; selectedPiece = null;
@ -239,10 +239,21 @@ public class Board {
} }
// other methods not changed // other methods not changed
public String[] toFileRep() { return null; } public String[] toFileRep() {
public Board(String[] array) {} //TODO
public void undoLastMove() {} return null;
public Board(Board board) {} }
public void playMove(Move move) {} public Board(String[] array) {
//TODO
}
public void undoLastMove() {
//TODO
}
public Board(Board board) {
//TODO
}
public void playMove(Move move) {
//TODO
}
} }