Rockstar Games interview question

How would you go about designing a state machine?