Example #1
0
	/// <summary>
	/// Simulate the state of the StateSpaceManager up to a certain Beat (specified by level)
	/// </summary>
	public void SimulateUpTo(StateSpaceManager stateSpaceManager, int startLevel, StoryArc story)
	{
		stateSpaceManager.resetGlobalState ();
		for(int i=0; i< startLevel; i++)
		{	
			foreach(StoryEvent ev in story.Beats[i].Events)
			{
				Rules.ClearCache();
				Transition implicitPopulated = new Transition(ev);
				implicitPopulated.populate(stateSpaceManager.globalState.worldstate);
				stateSpaceManager.changeStateToPostconditionsOf(implicitPopulated);
			}
		}
	}