What You've Learned

In this chapter, we put together a simple engine for a text adventure game. Along the way, you learned the following:

  • A game world can be represented by a mathematical graph, consisting of nodes for the places the player can visit and edges for the paths between these places.

  • You can store these nodes in an association list (alist) called *nodes*. This alist allows you to look up properties of a node/place by using its name. In the case of our game, the property we’re storing is a description of each node/place.

  • You use the assoc function to look up a key (location name in our example) in an alist.

  • Quasiquoting is a technique that allows you to insert small bits of computer code into larger pieces of data.

  • Some Lisp functions accept ...

Get Land of Lisp now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.