We'll add a single line of code in
BeginState and in
LostState to change Scenes.
Switch()method on line 42 as shown in the following screenshot:
StateUpdate()method on line 20 as shown in the following screenshot:
If earlier in this chapter you changed
WonState to switch to
PlayState instead of starting over with
BeginState, we're ready to test our State Machine again. ...