chiark / gitweb /
atoms.lisp: A player about to make a move is active.
authorMark Wooding <mdw@distorted.org.uk>
Fri, 22 Mar 2013 22:34:41 +0000 (22:34 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Fri, 22 Mar 2013 22:34:41 +0000 (22:34 +0000)
Fixes a bug in `game-update-scores' which you should never actually see,
since a player shouldn't become ready if the game's already been won.
But this was exposed by another bug, so I might as well fix it.

atoms.lisp

index e1c331c717d1999adee2e362b6439d303a027837..0855c84b7c2a8d0b5382dd29c63f381473f938c9 100644 (file)
@@ -290,7 +290,7 @@ (defmethod game-update-scores (game)
               (state (player-state player)))
          (cond ((and (zerop score) (eql state :playing))
                 (setf (player-state player) :losing))
-               ((member state '(:playing :starting))
+               ((member state '(:playing :starting :ready))
                 (incf remaining)
                 (setf found player)))))
       (changed game :scores :players players)