A finite state machine implementation This project serves as an example for my blog post. Check it out