You can now download the source code for all Infocom text adventure classics
The source code of every Infocom text adventure game has been uploaded to code-sharing repository GitHub, allowing savvy programmers to examine and build upon some of the most beloved works of digital storytelling to date.
There are numerous repositories under the name historicalsource, each for a different game. Titles include, but are not limited to, The Hitchhiker's Guide to the Galaxy, Planetfall, Shogun, and several Zork games—plus some more unusual inclusions like an incomplete version of Hitchhiker's sequel The Restaurant at the End of the Universe, Infocom samplers, and an unreleased adaptation of James Cameron's The Abyss.
Also at Motherboard.
(Score: 0) by Anonymous Coward on Friday April 19 2019, @09:01PM
I took a look at the code.
It's written in LISP. (Well, a LISP dialect where they use angle brackets instead of parentheses. Seems like a pointless change from the standard...)
If you were writing the code today, it would be more structured and in a different language.
Maybe you can glean some text input parser inspiration from the code, but that would be about it.