package uulm.teamname.marvelous.gamelibrary.gamelogic; import uulm.teamname.marvelous.gamelibrary.IntVector2; import uulm.teamname.marvelous.gamelibrary.entities.Entity; import uulm.teamname.marvelous.gamelibrary.entities.EntityID; import uulm.teamname.marvelous.gamelibrary.entities.StoneType; import java.util.ArrayList; import java.util.Iterator; /** Represents a game state view containing getters for all the properties of a {@link GameState}. */ public class GameStateView { /** The managed {@link GameState} */ private final GameState state; /** * Constructs a new {@link GameStateView}. * @param state A reference to the state to be viewable */ public GameStateView(GameState state) { this.state = state; } public IntVector2 getMapSize() { return state.mapSize; } public Iterator getEntities() { return state.entities.getEntities(); } public int getRoundNumber() { return state.roundNumber; } public int getTurnNumber() { return state.turnNumber; } public EntityID getActiveCharacter() { return state.activeCharacter; } public boolean isWon() { return state.won; } public float getStoneCooldown(StoneType stone) { return state.stoneCooldown.get(stone); } }