Gamelib/src/main/java/uulm/teamname/marvelous/gamelibrary/gamelogic/GameStateView.java

27 lines
740 B
Java
Raw Normal View History

package uulm.teamname.marvelous.gamelibrary.gamelogic;
import uulm.teamname.marvelous.gamelibrary.entities.Entity;
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;
}
//TODO: add immutable getters for all state properties
public Iterator<Entity> getEntities() {
return state.entities.getEntities();
}
}