Refactor of GUI - synchronized methods

Changed info box
This commit is contained in:
2026-05-22 17:21:24 +02:00
parent 9cef4617cd
commit 5b7e33f5dd
20 changed files with 215 additions and 236 deletions
@@ -1,46 +1,69 @@
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("Waiting"),
/**
* Stage in which players choose their totems.
*/
TOTEM_CHOICE,
TOTEM_CHOICE("Totem"),
/**
* Stage in which players select their action slots.
*/
SLOT_CHOICE,
SLOT_CHOICE("Slot"),
/**
* Stage in which the mandatory actions associated with the chosen slots are resolved.
*/
RES_ACTIONS,
RES_ACTIONS("Actions"),
/**
* Stage in which an optional card effect can be resolved.
*/
OPT_CARD_E,
OPT_CARD_E("Card Effect"),
/**
* Stage in which an event card is being resolved.
*/
RES_EVENT,
RES_EVENT("Event"),
/**
* Stage in which end-of-round or end-of-game operations are processed.
*/
ENDING,
ENDING("Ending"),
/**
* Stage indicating that the game has ended.
*/
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;
}
}