Enum Class GameConstants

java.lang.Object
java.lang.Enum<GameConstants>
it.polimi.ingsw.server.model.game_logic.enums.GameConstants
All Implemented Interfaces:
Serializable, Comparable<GameConstants>, Constable

public enum GameConstants extends Enum<GameConstants>
  • Enum Constant Details

    • MIN_NUMBER_OF_PLAYERS

      public static final GameConstants MIN_NUMBER_OF_PLAYERS
    • MAX_NUMBER_OF_PLAYERS

      public static final GameConstants MAX_NUMBER_OF_PLAYERS
    • NUMBER_OF_ISLANDS

      public static final GameConstants NUMBER_OF_ISLANDS
    • MAX_NUMBER_OF_CARDS

      public static final GameConstants MAX_NUMBER_OF_CARDS
    • DINING_ROOM_LANE_SIZE

      public static final GameConstants DINING_ROOM_LANE_SIZE
    • INITIAL_STUDENTS_PER_COLOR

      public static final GameConstants INITIAL_STUDENTS_PER_COLOR
  • Field Details

    • value

      public final int value
  • Constructor Details

    • GameConstants

      private GameConstants(int value)
  • Method Details

    • values

      public static GameConstants[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static GameConstants valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • isPlayersNumberValid

      public static boolean isPlayersNumberValid(int nPlayers)