Advertisement
Guest User

Untitled

a guest
Jul 27th, 2020
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 0.35 KB | None | 0 0
  1. (defmacro let-game ((game player) &body body)
  2.   `(let* ((player (gethash ,player ,game))
  3.           (opponent (gethash (not ,player) ,game)))
  4.      (declare (ignorable player))
  5.      (declare (ignorable opponent))
  6.      (macrolet ((hand (p) `(gethash "hand" (gethash ,p game)))
  7.                 (deck (p) `(gethash "deck" (gethash ,p game))))
  8.        ,@body)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement