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