Class PlayerList

java.lang.Object
it.polimi.ingsw.eriantys.model.PlayerList

public class PlayerList extends Object
A GameManager helper class to handle the players of the game, in particular for the variability of the turn order.
  • Constructor Details

    • PlayerList

      public PlayerList(List<String> nicknames, int entranceSize, int towerNumber)
  • Method Details

    • setFirst

      public void setFirst(Player target)
      A setter for the Player who is entitled to play as first in the current round.
      Parameters:
      target - the Player which will play as first
    • getTurnOrder

      public List<Player> getTurnOrder()
      A getter for a List containing the turn order referred to the current round.
      Returns:
      the reference to a List stating the turn order
    • get

      public Player get(String nickname)
      A getter for the Player object associated with a nickname.
      Parameters:
      nickname - the identifier of the Player
      Returns:
      the Player corresponding to the given nickname if it exists, null otherwise