implmentation of isWhite method and getType method

This commit is contained in:
Jérôme BEDIER 2025-04-18 16:48:49 +02:00
parent c52699581c
commit 385f457154
2 changed files with 2 additions and 7 deletions

View File

@ -43,10 +43,8 @@ public class Board {
}
public void populateBoard() {
/*
// Place Rooks
>>>>>>> branch 'master' of https://gitarero.ecam.fr/jerome.bedier/OOP_1A6_Project.git
board[0][0] = new Rook(PieceColor.BLACK, new Position(0, 0));
board[0][7] = new Rook(PieceColor.BLACK, new Position(0, 7));
board[7][0] = new Rook(PieceColor.WHITE, new Position(7, 0));
@ -72,7 +70,7 @@ public class Board {
board[1][i] = new Pawn(PieceColor.BLACK, new Position(1, i));
board[6][i] = new Pawn(PieceColor.WHITE, new Position(6, i));
}*/
}
}

View File

@ -19,10 +19,7 @@ public class Piece {
}
public boolean isWhite() {
if (whitePiece) {
return true;
}
return false;
return whitePiece;
}
}