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 3353a890d3 - Show all commits

View File

@@ -152,6 +152,22 @@ public Player getPlayerByColor(Color color) {
return null;
}
/**
* This method will be used to return the id of the Player defined by the given color parameter.
*
* @param color as the color of the player as a Color enumeration.
* @return the id of the player as an Integer.
*/
public int getPlayerIdByColor(Color color) {
for (Map.Entry<Integer, Player> entry : this.players.entrySet()) {
if (entry.getValue().getColor() == color) {
return entry.getKey();
}
}
return -1;
}
/**
* This method will be used to return the number of active players of this game.
*