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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access