Name: Anonymous 2009-10-18 1:30
i am teaching myself perl. i want to have two scrips play r-p-s and a third to keep score. for now it will be on a single computer. then over a network. im using linux.
(defun r-p-s ()
(elt '(r p s) (random 3)))
(defun win (x y)
(subsetp (member x '(r p s))
(member y '(r p s))))
(defun run (&optional (times 0))
(loop until (zerop (decf times))
collect (win (r-p-s) (r-p-s))))