Code for finite state machine workshop for SIG-Games.