implmentation of isWhite method and getType method
This commit is contained in:
parent
c52699581c
commit
385f457154
|
|
@ -43,10 +43,8 @@ public class Board {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void populateBoard() {
|
public void populateBoard() {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
// Place Rooks
|
// 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][0] = new Rook(PieceColor.BLACK, new Position(0, 0));
|
||||||
board[0][7] = new Rook(PieceColor.BLACK, new Position(0, 7));
|
board[0][7] = new Rook(PieceColor.BLACK, new Position(0, 7));
|
||||||
board[7][0] = new Rook(PieceColor.WHITE, new Position(7, 0));
|
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[1][i] = new Pawn(PieceColor.BLACK, new Position(1, i));
|
||||||
board[6][i] = new Pawn(PieceColor.WHITE, new Position(6, i));
|
board[6][i] = new Pawn(PieceColor.WHITE, new Position(6, i));
|
||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,10 +19,7 @@ public class Piece {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isWhite() {
|
public boolean isWhite() {
|
||||||
if (whitePiece) {
|
return whitePiece;
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue