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 09fda6b167 - Show all commits

View File

@@ -96,6 +96,23 @@ public void updatePlayerActiveState(int id, boolean active) {
this.players.get(id).setActive(active);
}
/**
* This method will be used to check if the given color parameter is already taken.
* If yes it will return true, otherwise false.
*
* @param color as the color which should be checked if taken as a Color enumeration.
* @return true or false.
*/
public boolean isColorTaken(Color color) {
for (Map.Entry<Integer, Player> entry : this.players.entrySet()) {
if (entry.getValue().getColor() == color) {
return true;
}
}
return false;
}
/**
* This method will be used to return the player which has the given id parameter.
*