isturn white done

This commit is contained in:
hugomanipoud2 2025-05-18 19:32:48 +02:00
parent faa41e63cd
commit a4250943d4
1 changed files with 7 additions and 2 deletions

View File

@ -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) {