November 2010
Intermediate to advanced
504 pages
12h 45m
English
With our graph construction stuff out of the way, we can write a simple function that initializes a brand-new game of Grand Theft Wumpus:
(defun new-game ()
(setf *congestion-city-edges* (make-city-edges))
(setf *congestion-city-nodes* (make-city-nodes *congestion-city-edges*))
(setf *player-pos* (find-empty-node))
(setf *visited-nodes* (list *player-pos*))
(draw-city))There are two new functions here. One, the find-empty-node function
, ensures that the player doesn’t end up on top of a bad guy right ...
Read now
Unlock full access