feat: implement all getters in GameStateView
This commit is contained in:
parent
eccac70656
commit
fcd2338b11
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user