fix bug in switchToPreviousPlayer

This commit is contained in:
schrom01 2021-12-02 17:39:33 +01:00
parent 9916d38073
commit 9294cbc3e3
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}
}