[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/gnugo 6c7e102 181/357: [gnugo int] Rename :waitingp to
From: |
Stefan Monnier |
Subject: |
[elpa] externals/gnugo 6c7e102 181/357: [gnugo int] Rename :waitingp to :waiting; save color there. |
Date: |
Sun, 29 Nov 2020 14:51:17 -0500 (EST) |
branch: externals/gnugo
commit 6c7e1027f7d9e161fb403be834c9dc3c2ec87650
Author: Thien-Thi Nguyen <ttn@gnu.org>
Commit: Thien-Thi Nguyen <ttn@gnu.org>
[gnugo int] Rename :waitingp to :waiting; save color there.
* packages/gnugo/gnugo.el (gnugo-board-buffer-p)
(gnugo-get-move-insertion-filter, gnugo-display-final-score)
(gnugo-gate, gnugo--q, gnugo-refresh, gnugo-board-mode): Update.
(gnugo-get-move): Save COLOR in :waiting.
---
gnugo.el | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/gnugo.el b/gnugo.el
index 2fa445f..8633996 100644
--- a/gnugo.el
+++ b/gnugo.el
@@ -326,7 +326,7 @@ Handle the big, slow-to-render, and/or uninteresting ones
specially."
(defun gnugo-board-user-play-ok-p (&optional buffer)
"Return non-nil if BUFFER is a GNUGO Board buffer ready for a user move."
(with-current-buffer (or buffer (current-buffer))
- (and gnugo-state (not (gnugo-get :waitingp)))))
+ (and gnugo-state (not (gnugo-get :waiting)))))
(defsubst gnugo--blackp (string)
(string= "black" string))
@@ -339,7 +339,7 @@ Handle the big, slow-to-render, and/or uninteresting ones
specially."
(user-error "Wrong buffer -- try M-x gnugo"))
(unless (gnugo-get :proc)
(user-error "No \"gnugo\" process!"))
- (when (gnugo-get :waitingp)
+ (when (gnugo-get :waiting)
(user-error "Not your turn yet -- please wait for \"\(%s to play\)\""
(gnugo-get :user-color)))
(when (and in-progress-p (gnugo-get :game-over))
@@ -370,10 +370,10 @@ Handle the big, slow-to-render, and/or uninteresting ones
specially."
"Send formatted command \"FMT ARGS...\"; wait for / return response.
The response is a string whose first two characters indicate the
status of the command. See also `gnugo-query'."
- (when (gnugo-get :waitingp)
- (user-error "Sorry, still waiting for %s to play"
- (gnugo-get :gnugo-color)))
- (let ((proc (gnugo-get :proc)))
+ (let ((slow (gnugo-get :waiting))
+ (proc (gnugo-get :proc)))
+ (when slow
+ (user-error "Sorry, still waiting for %s to play" slow))
(process-put proc :incomplete t)
(process-put proc :srs "") ; synchronous return stash
(gnugo--begin-exchange
@@ -1371,7 +1371,7 @@ be slow. (This should normally be unnecessary; specify
it only if the display
seems corrupted.) NOCACHE is silently ignored when GNU Go is thinking about
its move."
(interactive "P")
- (when (and nocache (not (gnugo-get :waitingp)))
+ (when (and nocache (not (gnugo-get :waiting)))
(gnugo-propertize-board-buffer))
(let* ((last-mover (gnugo-get :last-mover))
(other (gnugo-other last-mover))
@@ -1557,7 +1557,7 @@ its move."
(when (string-match "^= \\(.+\\)\n\n" full)
(let ((pos-or-pass (match-string 1 full)))
(gnugo-put :get-move-string nil)
- (gnugo-put :waitingp nil)
+ (gnugo-put :waiting nil)
(gnugo-push-move nil pos-or-pass)
(let ((buf (current-buffer)))
(let (gnugo-inhibit-refresh)
@@ -1567,7 +1567,7 @@ its move."
(gnugo-refresh))))))))))
(defun gnugo-get-move (color)
- (gnugo-put :waitingp t)
+ (gnugo-put :waiting color)
(gnugo--begin-exchange
(gnugo-get :proc) 'gnugo-get-move-insertion-filter
(concat "genmove " color))
@@ -1998,7 +1998,7 @@ Also, add the `:RE' SGF property to the root node of the
game tree."
(interactive)
(let ((game-over (gnugo-get :game-over)))
(unless (or game-over
- (and (not (gnugo-get :waitingp))
+ (and (not (gnugo-get :waiting))
(y-or-n-p "Game still in play. Stop play now? ")))
(user-error "Sorry, game still in play"))
(unless game-over
@@ -2254,7 +2254,7 @@ In this mode, keys do not self insert.
(mapc (lambda (prop)
(gnugo-put prop nil)) ; todo: separate display/game aspects;
'(:game-over ; move latter to func `gnugo'
- :waitingp
+ :waiting
:last-waiting
:black-captures
:white-captures
- [elpa] externals/gnugo fce1fb0 077/357: [gnugo sgf] Fix bug: Output subtrees correctly., (continued)
- [elpa] externals/gnugo fce1fb0 077/357: [gnugo sgf] Fix bug: Output subtrees correctly., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 5ca7efb 099/357: [gnugo int] Remove redundant game-over condition check., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 7fee3b2 104/357: [gnugo] Move "1 or 2" calculation into ‘gnugo-magic-undo’., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo a86327a 108/357: [gnugo] Add command ‘gnugo-frolic-in-the-leaves’ and keybinding., Stefan Monnier, 2020/11/29
- [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 <=
- [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, 2020/11/29
- [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