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