[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/gnugo 8211cb9 224/357: [gnugo int] Couple :center-posit
From: |
Stefan Monnier |
Subject: |
[elpa] externals/gnugo 8211cb9 224/357: [gnugo int] Couple :center-position and :SZ jamming. |
Date: |
Sun, 29 Nov 2020 14:51:26 -0500 (EST) |
branch: externals/gnugo
commit 8211cb9a513db7c547fc17138d29aff47dfdffdf
Author: Thien-Thi Nguyen <ttn@gnu.org>
Commit: Thien-Thi Nguyen <ttn@gnu.org>
[gnugo int] Couple :center-position and :SZ jamming.
* packages/gnugo/gnugo.el (gnugo--SZ!):
Convert to ‘defun’; also compute/assign :center-position.
(gnugo): Don't compute :center-position explicitly,
but do move point to it, after the refresh.
---
gnugo.el | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/gnugo.el b/gnugo.el
index 006fad5..06cabac 100644
--- a/gnugo.el
+++ b/gnugo.el
@@ -1850,8 +1850,12 @@ If FILENAME already exists, Emacs confirms that you wish
to overwrite it."
(defsubst gnugo--nodep (x)
(keywordp (caar x)))
-(defsubst gnugo--SZ! (size)
- (gnugo-put :SZ size))
+(defun gnugo--SZ! (size)
+ (gnugo-put :SZ size)
+ (gnugo-put :center-position
+ (funcall (gnugo--as-pos-func)
+ (let ((c (+ -1 ?a (truncate (1+ size) 2))))
+ (string c c)))))
(defun gnugo--plant-and-climb (collection &optional sel)
(gnugo-put :sgf-collection collection)
@@ -2510,11 +2514,7 @@ starting a new one. See `gnugo-board-mode'
documentation for more info."
handicap)))))))
(gnugo-put :waiting-start (current-time))
(gnugo-refresh t)
- (let ((half (truncate (1+ (gnugo-get :SZ)) 2)))
- (gnugo-goto-pos (format "A%d" half))
- (forward-char (* 2 (1- half)))
- (gnugo-put :center-position
- (get-text-property (point) 'gnugo-position)))
+ (gnugo-goto-pos (gnugo-get :center-position))
;; first move
(gnugo-put :game-start-time (current-time))
(let ((g (gnugo-get :gnugo-color))
- [elpa] externals/gnugo f5fbba3 153/357: [gnugo int] Fix bug: Update local var ‘ends’ when branching., (continued)
- [elpa] externals/gnugo f5fbba3 153/357: [gnugo int] Fix bug: Update local var ‘ends’ when branching., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo a4dcef8 150/357: [gnugo frolic int] Parameterize, centralize awakening., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 1b69add 160/357: [gnugo int] Decruft: Drop gametree IR element: KIDS, Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 891a97a 177/357: [gnugo int] Add abstraction: gnugo--decorate, Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 843cd96 163/357: [gnugo frolic int] Add abstraction: gnugo--sideways, Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo eb13b8e 180/357: [gnugo] Dropped command: ‘t’ (gnugo-toggle-dead-group), Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 6c7e102 181/357: [gnugo int] Rename :waitingp to :waiting; save color there., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 425731b 196/357: [gnugo int] Add abstraction: gnugo--ERR-wait, Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 3f3af4b 208/357: [gnugo int] Remove from ‘gnugo-state’ instead of setting to nil., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo f28d241 223/357: [gnugo int] Decruft: Don't set provisional :last-user-bpos., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 8211cb9 224/357: [gnugo int] Couple :center-position and :SZ jamming.,
Stefan Monnier <=
- [elpa] externals/gnugo 536960c 230/357: [gnugo int] Fix bug: On -l/--infile, inhibit first move if game over., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 50cc2b3 233/357: [gnugo int] Add abstraction: gnugo--q/ue, Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 3903907 235/357: [gnugo] Validate position arg of GTP commands ‘undo’, ‘gg-undo’., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo ab1f4c2 242/357: [gnugo] Fix bug: DTRT for suggestion ‘nowarp’ check., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo e814724 243/357: [gnugo] Allow user to request suggestion for GNU Go., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 5157534 241/357: [gnugo int] Use ‘destructuring-bind’ more., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 6c99d78 251/357: [gnugo int] Add abstraction: gnugo--no-worries, Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 9f5fcfc 250/357: [gnugo int] Add abstraction: gnugo--resignp, Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 2612c6b 263/357: [gnugo] Replace abdication w/ Assist and Zombie minor modes., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo b586e0c 268/357: [gnugo] Refuse to climb towards root when in Assist mode., Stefan Monnier, 2020/11/29