Pretty sure the Archlinux official repos had a package called "bsdgames" or similar that included a game like that. It's not there now. Maybe it got split up or sent to the AUR.
It is bsd-games in the community repository, and trek in AUR. The bsd-games package includes Adventure, which is the traditional text adventure game. Those packages also include a collection of other text based games that demonstrate how varied text based games can be.