]> code.delx.au - gnu-emacs-elpa/commitdiff
[gnugo] Fix bug: On role switch, flip karma after roles.
authorThien-Thi Nguyen <ttn@gnu.org>
Wed, 30 Apr 2014 06:55:09 +0000 (08:55 +0200)
committerThien-Thi Nguyen <ttn@gnu.org>
Wed, 30 Apr 2014 06:55:09 +0000 (08:55 +0200)
Omission from 2014-04-29, "Replace
abdication w/ Assist and Zombie minor modes".

* packages/gnugo/gnugo.el (gnugo-undo-one-move): Call
‘gnugo--who-is-who’ after switching :gnugo-color, :user-color.

packages/gnugo/gnugo.el

index b0d46100ad183ad391c8bf08e4d8560f24922dea..06488a73af426a91f08da09a3d5f12ebd0830f8c 100644 (file)
@@ -2060,10 +2060,11 @@ See also `gnugo-undo-two-moves'."
   (gnugo-gate)
   (when me-next
     (let* ((play (gnugo-get :last-mover))
-           (wait (gnugo-other play)))
-      (gnugo--who-is-who wait play (string= play (gnugo-get :user-color)))
+           (wait (gnugo-other play))
+           (samep (string= play (gnugo-get :user-color))))
       (gnugo-put :user-color play)
-      (gnugo-put :gnugo-color wait)))
+      (gnugo-put :gnugo-color wait)
+      (gnugo--who-is-who wait play samep)))
   (gnugo--climb-towards-root 1 t))
 
 (defun gnugo-undo-two-moves ()