Loads a ScenarioModel into the engine
The ScenarioModel to load
If this is true, then the margins are also loaded and the GameState is set to Election. Used for when you want to view the map without actually playing the game
Finalizes loading the scenario after loadScenario is called. Sets which candidate is the player and who their running mate is.
Used to lookup a side in the ScenarioModel's scenarioSides. Loads that sides questions into the game.
The id of the running mate of the player.
Calls the onAchievementUnlocked method with the achievementName and the current ScenarioController. The Engine does not handle the logic of if an achivement is already unlocked, or storing achievements. That is left to the host site.
Holds the display names for counters, if a display name is not defined it defaults to the counter's key + value
Any variable in counters will be shown on screen. Only supports number variables. Use setCounter, setCounter methods
Called when the game ends and ending slides/results are calculated. Is set from the method of the same name in a scenario's logic.js
Index of current question
Currently loaded ScenarioModel
To be hooked into from a host site to know when an achievement is unlocked.
Called when the an answer is chosen. Is set from the method of the same name in a scenario's logic.js. Used for CYOA purposes.
Called when the scenario side is first set (played has chose their running mate and pressed start game)
Range of RNG.
Id of the player's running mate. -1 if unset.
Index of current side
Is the player currently waiting to pick a state before moving on to the next question?
The main engine that runs the logic for the game. Should be entirely separate from the View and should have no knowledge of how the player is using it.