emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] 01/01: [gnugo int] Use ‘gnugo --as-pos-func’ more.


From: Thien-Thi Nguyen
Subject: [elpa] 01/01: [gnugo int] Use ‘gnugo --as-pos-func’ more.
Date: Thu, 03 Apr 2014 12:34:23 +0000

ttn pushed a commit to branch master
in repository elpa.

commit fd29a13666c89c9f11ffb53c2753ee726d1d6fc8
Author: Thien-Thi Nguyen <address@hidden>
Date:   Thu Apr 3 14:35:35 2014 +0200

    [gnugo int] Use ‘gnugo--as-pos-func’ more.
    
    * packages/gnugo/gnugo.el (gnugo-move-history): ...here.
---
 packages/gnugo/gnugo.el |   12 +++---------
 1 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/packages/gnugo/gnugo.el b/packages/gnugo/gnugo.el
index ce93f1c..342950f 100644
--- a/packages/gnugo/gnugo.el
+++ b/packages/gnugo/gnugo.el
@@ -660,19 +660,13 @@ For all other values of RSEL, do nothing and return nil."
   (interactive "P")
   (let* ((monkey (gnugo-get :monkey))
          (mem (aref monkey 0))
-         (size (gnugo-get :SZ))
+         (as-pos (gnugo--as-pos-func (gnugo-get :SZ)))
          col
          acc node mprop move)
     (cl-labels
-        ((as-pos (cc) (if (string= "" cc)
-                          "PASS"
-                        (setq col (aref cc 0))
-                        (format "%c%d"
-                                (+ ?A (- (if (> ?i col) col (1+ col)) ?a))
-                                (- size (- (aref cc 1) ?a)))))
-         (as-pos-maybe (x) (if (string= "resign" x)
+        ((as-pos-maybe (x) (if (string= "resign" x)
                                x
-                             (as-pos x)))
+                             (funcall as-pos x)))
          (next (byp) (when (setq node (pop mem)
                                  mprop (gnugo--move-prop node))
                        (setq move (as-pos-maybe (cdr mprop)))



reply via email to

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