Enum Class GameStages

java.lang.Object
java.lang.Enum<GameStages>
it.polimi.ingsw.gc14.Model.GamePackage.GameStages
All Implemented Interfaces:
Serializable, Comparable<GameStages>, Constable

public enum GameStages extends Enum<GameStages>
Represents the possible stages of a game.
  • Nested Class Summary

    Nested classes/interfaces inherited from class Enum

    Enum.EnumDesc<E>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Stage indicating that the game has ended.
    Stage in which end-of-game scoring and ranking are computed.
    Stage in which an optional card effect can be resolved.
    Stage in which the mandatory actions associated with the chosen slots are resolved.
    Stage in which an event card is being resolved.
    Stage in which players select their action slots.
    Stage in which players choose their totems.
    Stage in which the game is waiting for players to join.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final String
    The human-readable name of this stage, used in toString().
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    GameStages(String displayName)
    Constructs a GameStages value with the given display name.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the human-readable name of this stage.
    static GameStages
    Returns the enum constant of this class with the specified name.
    static GameStages[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • WAITING

      public static final GameStages WAITING
      Stage in which the game is waiting for players to join.
    • TOTEM_CHOICE

      public static final GameStages TOTEM_CHOICE
      Stage in which players choose their totems.
    • SLOT_CHOICE

      public static final GameStages SLOT_CHOICE
      Stage in which players select their action slots.
    • RES_ACTIONS

      public static final GameStages RES_ACTIONS
      Stage in which the mandatory actions associated with the chosen slots are resolved.
    • OPT_CARD_E

      public static final GameStages OPT_CARD_E
      Stage in which an optional card effect can be resolved.
    • RES_EVENT

      public static final GameStages RES_EVENT
      Stage in which an event card is being resolved.
    • ENDING

      public static final GameStages ENDING
      Stage in which end-of-game scoring and ranking are computed.
    • ENDED

      public static final GameStages ENDED
      Stage indicating that the game has ended.
  • Field Details

    • displayName

      private final String displayName
      The human-readable name of this stage, used in toString().
  • Constructor Details

    • GameStages

      private GameStages(String displayName)
      Constructs a GameStages value with the given display name.
      Parameters:
      displayName - the human-readable label for this stage
  • Method Details

    • values

      public static GameStages[] 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 GameStages 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
    • toString

      public String toString()
      Returns the human-readable name of this stage.
      Overrides:
      toString in class Enum<GameStages>
      Returns:
      the display name (e.g. "Slot" for SLOT_CHOICE)