Its been a while since I've worked on my project ohm and I remember reading a blog about coding finite state machines with event emitters. So I did a little search and found this question, with interesting answer by Konrad Rudolph which sparked this fun little refactor.
Explicitly factoring out the states even further led me to this solution, which I don't claim to be an improvement. Use cases, drawbacks and advantages are beyond this scope, but do provide interesting conversation starters at cocktail parties, or job interviews.
This C++ implementation compiles and runs. I am not adding any build instructions because I don't feel that adds to the fun-ness of this problem but would gladly provide if wanted.