Package it.polimi.ingsw.model
Enum GamePhase
- java.lang.Object
-
- java.lang.Enum<GamePhase>
-
- it.polimi.ingsw.model.GamePhase
-
- All Implemented Interfaces:
Serializable
,Comparable<GamePhase>
public enum GamePhase extends Enum<GamePhase>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CHOOSE_ACTION
CHOOSE_GOD
CHOOSE_WORKER
END
PENDING
SET_COLOR
SET_GOD_LIST
Different game phasesSET_WORKERS
START_PLAYER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description GamePhase
next()
Gives the next GamePhaseGamePhase
prev()
Gives the previous GamePhasestatic GamePhase
start()
Used only to start the gamestatic GamePhase
valueOf(String name)
Returns the enum constant of this type with the specified name.static GamePhase[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SET_GOD_LIST
public static final GamePhase SET_GOD_LIST
Different game phases
-
CHOOSE_GOD
public static final GamePhase CHOOSE_GOD
-
START_PLAYER
public static final GamePhase START_PLAYER
-
SET_COLOR
public static final GamePhase SET_COLOR
-
SET_WORKERS
public static final GamePhase SET_WORKERS
-
CHOOSE_WORKER
public static final GamePhase CHOOSE_WORKER
-
PENDING
public static final GamePhase PENDING
-
CHOOSE_ACTION
public static final GamePhase CHOOSE_ACTION
-
END
public static final GamePhase END
-
-
Method Detail
-
values
public static GamePhase[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (GamePhase c : GamePhase.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static GamePhase valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-
next
public GamePhase next()
Gives the next GamePhase- Returns:
- next GamePhase
-
prev
public GamePhase prev()
Gives the previous GamePhase- Returns:
- previous GamePhase
-
start
public static GamePhase start()
Used only to start the game- Returns:
- GamePhase as SET_GOD_LIST
-
-