Whenever you're ready, walk me through how you'd approach this.
Let's design a reusable library for implementing a state machine.