I really don't like writing state machines by hand... So...
I was writing a web-based text adventure game, using async / await on the server...
I was writing a SDML text adventure game, with some graphics, using async / await on the control side...
Then I finally realized that since all of my commands are like Console WriteLine and Console ReadLine... that I could just do all of my logic in a thread of its own. And it stores UI state in a object... and uses two AutoResetEvents to keep track of which thread is in control.
I guess those are coroutines. One for logic and one for UI.
Makes my logic code as simple as could be, with no async / await or any other garbage. (I handle a couple top-level exceptions for closing connections or closing the app.)
And it's also trivial to test my code on an actual Console, before worrying about setting up my web server or my GUI environment, which has a bit of latency to it.
If you write a text adventure, use Inform6 if you like OOP progamming or Inform7 if you want... something else, declaratively. Both can compile to a Z8 game which can run everywhere, from 16 bit computers and up.
I'm one of those idiots who would rather write an engine than a game.
I'm cribbing from LambdaMOO and Inform 6.
As for opening the ZMachine games (V3/5/8), you know, from Zork and friends... there's Winfrotz on Windows, Lectrote on Android/OSX whatever, and Frotz for Linux/BSD diehard fans. Oh, and Frotz for Amiga, Atari, DOS, old Macs...)
That's why I suggested you Inform6. Even with Inform7, a Z8 machine game (look up Anchorhead anchor.z8 and Inside Woman woman.z8 under a search engine) they will look and play well on really, really old computers. Download and open them in order to see what the ZMachine and Inform are able to do with very little constraints.
The 1st game it's a Lovecraftian tale set in the 90's (hello Stephen King), the second one a futuristic/half-cyberpunk/dystopian one.
And is not the best one I've seen. They are jewels like Spider and Web (tangle.z5), a techno-triller which is a bit like Memento/Bourne and similar movies.
Again, these are playable from a current powerhouse computer to a DOS one from 1993. And they are far better than the guess-the-word games from the 80's, the community improved the Infocom's ZMachine to really easy levels.
In order to start with Inform6, I suggest you to learn with "Inform's Begginers' Guide', a free to download book. For advanced stuff, there's the Inform Designed manual, but that's for really low level stuff. Such as declaring really fancy grammars or even a new one for languages like Italian to create parsers for that language, for instance (as we already have a library for Spanish games). But it's good to have (dm4.pdf) in order to debug issues.
Have fun.