Coverage Summary for Class: GameStages (it.polimi.ingsw.gc14.Model.GamePackage)
| Class |
Class, %
|
Method, %
|
Line, %
|
| GameStages |
100%
(1/1)
|
75%
(3/4)
|
91.7%
(11/12)
|
package it.polimi.ingsw.gc14.Model.GamePackage;
/**
* Represents the possible stages of a game.
*/
public enum GameStages {
/**
* Stage in which the game is waiting for players to join.
*/
WAITING("Waiting"),
/**
* Stage in which players choose their totems.
*/
TOTEM_CHOICE("Totem"),
/**
* Stage in which players select their action slots.
*/
SLOT_CHOICE("Slot"),
/**
* Stage in which the mandatory actions associated with the chosen slots are resolved.
*/
RES_ACTIONS("Actions"),
/**
* Stage in which an optional card effect can be resolved.
*/
OPT_CARD_E("Card Effect"),
/**
* Stage in which an event card is being resolved.
*/
RES_EVENT("Event"),
/**
* Stage in which end-of-game scoring and ranking are computed.
*/
ENDING("Ending"),
/**
* Stage indicating that the game has ended.
*/
ENDED("Ended");
/** The human-readable name of this stage, used in {@link #toString()}. */
private final String displayName;
/**
* Constructs a {@code GameStages} value with the given display name.
*
* @param displayName the human-readable label for this stage
*/
GameStages(String displayName) {
this.displayName = displayName;
}
/**
* Returns the human-readable name of this stage.
*
* @return the display name (e.g. {@code "Slot"} for {@code SLOT_CHOICE})
*/
@Override
public String toString() {
return displayName;
}
}