Added: SkipNotConnected model method

This commit is contained in:
rubenpirreram
2026-05-07 15:52:37 +02:00
parent f3cd29169c
commit a2dd6f3d9b
2 changed files with 15 additions and 1 deletions
@@ -30,7 +30,11 @@ public class GameController {
*/
public GameController() {
}
//TODO
public boolean SkipNotConnectedPlayer(Player player)
{
return model.SkipNotConnectedPlayer(player);
}
/**
* Returns the game model managed by this controller.
*
@@ -40,7 +40,17 @@ public class Game implements Serializable {
public List<Player> getPlayers() {
return playersList;
}
//TODO
public boolean SkipNotConnectedPlayer(Player player)
{
if(currentState.getCurrentPlayer()!=player)
{
return false;
}
nextPlayerSetup();
return true;
}
/**
* Returns the current number of players participating in the game.
* @return the current number of players.