isturn white done
This commit is contained in:
parent
faa41e63cd
commit
a4250943d4
|
|
@ -7,6 +7,7 @@ public class Board {
|
|||
private int line; // constructors for column and line
|
||||
private ArrayList<Piece> pieces; // list of all pieces on the board
|
||||
private Piece newPiece; // to add a piece to the board
|
||||
private int turnNb = 0;
|
||||
|
||||
//initiation of the board, creating an 8 * 8 grid
|
||||
public Board(int colNum, int lineNum) {
|
||||
|
|
@ -30,8 +31,12 @@ public class Board {
|
|||
}
|
||||
|
||||
public boolean isTurnWhite() {
|
||||
//TODO
|
||||
return false;
|
||||
if (turnNb % 2 == 0){
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public void setPiece(boolean isWhite, PieceType type, int x, int y) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue