Package cs1302.gameutil
Enum Class GamePhase
- All Implemented Interfaces:
Serializable
,Comparable<GamePhase>
,Constable
A
Diagram of the
GamePhase
object can be used to represent a phase of a game.
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
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Method Summary
-
Enum Constant Details
-
NEW
A newly constructed game is in this phase. -
READY
A game that is ready to be played is in this phase. -
PLAYABLE
A game that is being played is in this phase. -
OVER
A game that has ended is in this phase.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-