merge the new developmentbranch into the test branch #39

Closed
j23f0712 wants to merge 431 commits from development2 into dev/test
Showing only changes of commit bb51976127 - Show all commits

View File

@@ -49,4 +49,14 @@ public void clearOccupant() {
public boolean isOccupied() { public boolean isOccupied() {
return occupant != null; return occupant != null;
} }
/**
* This method will be used to check if the node is occupied by a piece of the given color.
*
* @param color as the color of the piece as a Color object.
* @return true or false.
*/
public boolean isOccupied(Color color) {
return this.occupant != null && this.occupant.getColor() == color;
}
} }