[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/gnugo 00ae088 120/357: [gnugo int] Use ‘gnugo--tree-en

From: Stefan Monnier
Subject: [elpa] externals/gnugo 00ae088 120/357: [gnugo int] Use ‘gnugo--tree-ends’ more.
Date: Sun, 29 Nov 2020 14:51:03 -0500 (EST)

branch: externals/gnugo
commit 00ae0881cc24f1000beaec1fd59fcb5068914097
Author: Thien-Thi Nguyen <ttn@gnu.org>
Commit: Thien-Thi Nguyen <ttn@gnu.org>

    [gnugo int] Use ‘gnugo--tree-ends’ more.
    Omission from 2014-04-05,
    "Add abstractions: gnugo--{,set-}tree-ends".
    * packages/gnugo/gnugo.el (gnugo-note, gnugo-magic-undo): ...here.
 gnugo.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/gnugo.el b/gnugo.el
index e45a6ff..83f503c 100644
--- a/gnugo.el
+++ b/gnugo.el
@@ -1011,7 +1011,7 @@ are dimmed.  The buffer is in View minor mode."
                        (push mem (nthcdr bidx ls))
                        (apply 'vector ls))))
              (push fruit mem)
-             (aset tree bidx mem)))
+             (aset ends bidx mem)))
           (setf (aref monkey 0) mem)
           (incf (aref monkey 2)))
       (setcdr (last (car mem)) fruit))))
@@ -1683,8 +1683,8 @@ when play resumes."
          (user-color (gnugo-get :user-color))
          (monkey (gnugo-get :monkey))
          (tree (gnugo-get :sgf-gametree))
-         (remorseful (not (gnugo--no-regrets
-                           monkey (gnugo--tree-ends tree))))
+         (ends (gnugo--tree-ends tree))
+         (remorseful (not (gnugo--no-regrets monkey ends)))
          done ans)
     (cond ((numberp spec)
            (setq n (if (zerop spec)
@@ -1729,7 +1729,7 @@ when play resumes."
                                    (gnugo-get :center-position)))
       (gnugo-refresh t)
       (unless (or keep remorseful)
-        (aset tree (aref monkey 1) (aref monkey 0)))
+        (aset ends (aref monkey 1) (aref monkey 0)))
       (when (and ulastp (not noalt))
         (gnugo-get-move (gnugo-get :gnugo-color))))))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]