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