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