fix bug in switchToPreviousPlayer
This commit is contained in:
@@ -58,10 +58,10 @@ public class SiedlerGame {
|
||||
* Switches to the next player in the defined sequence of players.
|
||||
*/
|
||||
public void switchToNextPlayer() {
|
||||
if (activePlayer < allPlayers.size()){
|
||||
if (activePlayer < allPlayers.size() -1){
|
||||
activePlayer++;
|
||||
}
|
||||
else if (activePlayer == allPlayers.size()){
|
||||
else if (activePlayer == allPlayers.size() -1){
|
||||
activePlayer = 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user