Enum Class GamePhase

java.lang.Object
java.lang.Enum<GamePhase>
cs1302.gameutil.GamePhase
All Implemented Interfaces:
Serializable, Comparable<GamePhase>, Constable

public enum GamePhase extends Enum<GamePhase>
A GamePhase object can be used to represent a phase of a game.
Diagram of the cs1302.gameutil.GamePhase class.
Diagram of the cs1302.gameutil.GamePhase class.

A game might progress through the following phases:

GamePhase.NEW
A newly constructed game is in this phase.
GamePhase.READY
A game that is ready to be played is in this phase.
GamePhase.PLAYABLE
A game that is being played is in this phase.
GamePhase.OVER
A game that has ended is in this phase.
Related CSCI 1302 projects:
cs1302-c4-alpha
  • Enum Constant Details

    • NEW

      public static final GamePhase NEW
      A newly constructed game is in this phase.
    • READY

      public static final GamePhase READY
      A game that is ready to be played is in this phase.
    • PLAYABLE

      public static final GamePhase PLAYABLE
      A game that is being played is in this phase.
    • OVER

      public static final GamePhase OVER
      A game that has ended is in this phase.
  • Method Details

    • values

      public static GamePhase[] 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 GamePhase 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