Only the Computer has to roll the dice (Errata for Chapter 20)

23 views
Skip to first unread message

Christopher Brandt

unread,
Jun 7, 2011, 4:57:02 PM6/7/11
to Land of Lisp
Hi everyone,
on page 421 a call to "pick-chance-branch" is added to "handle-human"
in order to make the human player roll the dice. I think it should
have been "web-handle-human" instead, because this is the function
used in the web-interface. I tried it like the following which seemed
to work:

(defun web-handle-human (pos)
...
(t (setf *cur-game-tree*
(pick-chance-branch (cadr *cur-game-tree*) (lazy-
find- if (lambda (move)

(equal (car move)

(list *from-tile* pos)))

(caddr *cur-game-tree*))))
...))))


Greetings from Hamburg
Christopher
Reply all
Reply to author
Forward
0 new messages