This commit is contained in:
thibaud 2025-04-09 10:10:10 +02:00
parent f1d7e0ff98
commit d69dbecb82
1 changed files with 7 additions and 5 deletions

View File

@ -7,28 +7,30 @@ public class Board {
private int width;
private int height;
private int turnNumber;
private Piece[][] board;
public Board(int colNum, int lineNum) {
this.width = colNum;
this.height = lineNum;
this.turnNumber = 0;
this.board = new Piece[width][height];
}
public int getWidth() {
return width;
return this.width;
}
public int getHeight() {
return height;
return this.height;
}
public int getTurnNumber() {
//TODO
return 0;
return this.turnNumber;
}
public boolean isTurnWhite() {
//TODO
return false;
return (turnNumber % 2 == 0); // White plays on even-numbered turns
}
public void setPiece(boolean isWhite, PieceType type, int x, int y) {