feat: implement all getters in GameStateView

This commit is contained in:
punchready 2021-04-30 21:48:48 +02:00
parent eccac70656
commit fcd2338b11
1 changed files with 26 additions and 1 deletions

View File

@ -1,6 +1,9 @@
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;
@ -18,9 +21,31 @@ public class GameStateView {
this.state = state;
}
//TODO: add immutable getters for all state properties
public IntVector2 getMapSize() {
return state.mapSize;
}
public Iterator<Entity> 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);
}
}