fix: add configs to GameInstance and fix GameState snapshots
This commit is contained in:
@ -3,6 +3,9 @@ package uulm.teamname.marvelous.gamelibrary.gamelogic;
|
||||
import uulm.teamname.marvelous.gamelibrary.IntVector2;
|
||||
import uulm.teamname.marvelous.gamelibrary.events.Event;
|
||||
import uulm.teamname.marvelous.gamelibrary.events.EventType;
|
||||
import uulm.teamname.marvelous.gamelibrary.json.config.CharacterConfig;
|
||||
import uulm.teamname.marvelous.gamelibrary.json.config.PartyConfig;
|
||||
import uulm.teamname.marvelous.gamelibrary.json.config.ScenarioConfig;
|
||||
import uulm.teamname.marvelous.gamelibrary.requests.Request;
|
||||
|
||||
import java.util.Observer;
|
||||
@ -22,8 +25,8 @@ public class GameInstance {
|
||||
private final EventEmitter emitter = new EventEmitter();
|
||||
|
||||
/** Constructs a new {@link GameInstance}. */
|
||||
public GameInstance(IntVector2 mapSize) {
|
||||
_state = new GameState(mapSize);
|
||||
public GameInstance(PartyConfig partyConfig, CharacterConfig characterConfig, ScenarioConfig scenarioConfig) {
|
||||
_state = new GameState(partyConfig, characterConfig, scenarioConfig);
|
||||
this.state = new GameStateView(_state);
|
||||
manager = new GameStateManager(_state);
|
||||
}
|
||||
|
Reference in New Issue
Block a user