In my theoretical computer science class I learned about state machines and fell for the idea. After implementing a universal turing machine, I asked myself what other use cases a deterministic automaton could have. I thought I could write an engine for text adventure games using this idea.
Text adventures have traditionally been built in an imperative manner, following a flow chart like pattern. I thought this could have some improvement. So I wrote a deterministic finite state machine in NodeJS, where i can feed my adventure as a YAML file. Said file is basically a set of states, in which each state represents a prompt on the commandline and interactions who are transitions to other states. I found it works pretty well. Unfortunately im a terrible story writer, so I hope one day someone send me a cool adventure that I can play 🙂