This commit is contained in:
parent
f1d7e0ff98
commit
d69dbecb82
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue