fix: add more necessary getters to GameStateView
This commit is contained in:
parent
1348e342d6
commit
588633fe46
@ -5,6 +5,7 @@ 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}. */
|
||||
@ -40,6 +41,10 @@ public class GameStateView {
|
||||
return state.activeCharacter;
|
||||
}
|
||||
|
||||
public ArrayList<EntityID> getTurnOrder() {
|
||||
return state.turnOrder;
|
||||
}
|
||||
|
||||
public boolean isWon() {
|
||||
return state.won;
|
||||
}
|
||||
@ -47,4 +52,8 @@ public class GameStateView {
|
||||
public int getStoneCooldown(StoneType stone) {
|
||||
return state.stoneCooldown.getCooldown(stone);
|
||||
}
|
||||
|
||||
public ParticipantType getWinnerAccordingToWinConditions() {
|
||||
return GameLogic.checkWinConditions(state);
|
||||
}
|
||||
}
|
||||
|
@ -5,6 +5,10 @@ import uulm.teamname.marvelous.gamelibrary.IntVector2;
|
||||
import uulm.teamname.marvelous.gamelibrary.entities.EntityID;
|
||||
import uulm.teamname.marvelous.gamelibrary.entities.EntityType;
|
||||
import uulm.teamname.marvelous.gamelibrary.entities.Rock;
|
||||
import uulm.teamname.marvelous.gamelibrary.events.Event;
|
||||
import uulm.teamname.marvelous.gamelibrary.requests.CharacterRequest;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user