Class GameManager

java.lang.Object
polimi.ingsw.am21.codex.model.GameManager

public class GameManager extends Object
  • Constructor Details

    • GameManager

      public GameManager()
  • Method Details

    • getGames

      public Set<String> getGames()
    • getCurrentSlots

      public Map<String,Integer> getCurrentSlots()
      Returns the current number of players in each game.
      Returns:
      a map with the game name as key and the number of players as value
    • getMaxSlots

      public Map<String,Integer> getMaxSlots()
      Returns the maximum number of players in each game.
      Returns:
      a map with the game name as key and the maximum number of players as value
    • getGame

      public Optional<Game> getGame(String gameName)
    • createGame

      public Game createGame(String gameName, Integer players) throws InvalidActionException
      Throws:
      InvalidActionException
    • deleteGame

      public void deleteGame(String gameName)