Hi @ChrisF,
Welcome to our community! 
Good job on fixing the problem. At the moment, Rick’s solution is hard-coded, and it works only if we have an array with a specific length and do not press any “wrong” key on our keyboard.
In lecture “For Loops”, Rick is going to replace his current solution with a more flexible one which allows us to have a different number of “next states” in each State object.
Did this help?
See also:
- Forum User Guides : How to mark a topic as solved