[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/gnugo 85e3d91 253/357: [gnugo int] Snoop ‘--handicap N
From: |
Stefan Monnier |
Subject: |
[elpa] externals/gnugo 85e3d91 253/357: [gnugo int] Snoop ‘--handicap N’ for empty new board. |
Date: |
Sun, 29 Nov 2020 14:51:33 -0500 (EST) |
branch: externals/gnugo
commit 85e3d91879e0ed048360a0fa78e1136688681ec9
Author: Thien-Thi Nguyen <ttn@gnu.org>
Commit: Thien-Thi Nguyen <ttn@gnu.org>
[gnugo int] Snoop ‘--handicap N’ for empty new board.
Regression introduced from 2014-04-19, "Fix bug:
Ensure gametree sync for -l/--infile".
* packages/gnugo/gnugo.el (gnugo): ...here.
---
gnugo.el | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/gnugo.el b/gnugo.el
index e8e7a71..92ccf0b 100644
--- a/gnugo.el
+++ b/gnugo.el
@@ -2517,6 +2517,16 @@ See `gnugo-board-mode' for a full list of commands."
komi (gnugo--nquery "get_komi")
handicap (gnugo--nquery "get_handicap")
board-size (gnugo--nquery "query_boardsize")))
+ ;; Work around a GNU Go 3.8 (and possibly earlier/later)
+ ;; bug whereby GTP command ‘get_handicap’ fails to return
+ ;; the N set by ‘--handicap N’ on the command line.
+ (let ((actually (member "--handicap" args)))
+ ;; Checking ‘(zerop handicap)’ first is not strictly
+ ;; necessary; it represents a hope that some day GNU Go
+ ;; will DTRT (or provide rationale for this weird behavior)
+ ;; and become worthy of our trust.
+ (when (and (zerop handicap) actually)
+ (setq handicap (string-to-number (cadr actually)))))
(r! :SZ board-size
:DT (format-time-string "%Y-%m-%d")
:RU (if (member "--chinese-rules" args)
- [elpa] externals/gnugo e96b88b 218/357: [gnugo] Decruft: Use ‘gnugo-program’ directly as executable., (continued)
- [elpa] externals/gnugo e96b88b 218/357: [gnugo] Decruft: Use ‘gnugo-program’ directly as executable., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 3670b0b 228/357: [gnugo] On SGF load, leave cursor at last user board position., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 1020a7f 237/357: [gnugo int] Simplify towards-root loop termination check., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 7114ed6 234/357: [gnugo int] Add abstraction: gnugo--mem-with-played-stone, Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 9ae1363 236/357: [gnugo] Internalize ‘gnugo-magic-undo’., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo a92e184 255/357: fixup! [gnugo int] Decorate w/ plist instead of alist., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 71e1500 245/357: [gnugo] Fix bug: Use ‘gnugo-gate’ for abdication enable., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 46f49e3 246/357: [gnugo int] Use ‘gnugo-current-player’ more., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 443903e 249/357: [gnugo int] Drop abstraction: pretty, Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo a0ecdea 257/357: [gnugo] Conditionalize xform warping on abdication disable., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 85e3d91 253/357: [gnugo int] Snoop ‘--handicap N’ for empty new board.,
Stefan Monnier <=
- [elpa] externals/gnugo 7c7d43c 261/357: [gnugo int] Avoid superfluous ‘gnugo-other’ call., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 6ddf38f 269/357: [gnugo int] Add abstraction: gnugo--assist-state, Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo d48adca 244/357: [gnugo] On disable, transform in-flight user-move into suggestion., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 764251b 259/357: [gnugo int] Fix bug: Use correct color for "Not your turn yet"., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 16da062 284/357: [gnugo int] Use ‘loop ... collect’ more., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo e2f7c7b 212/357: [gnugo int] Consolidate display scaling factors access., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 2bde4bc 207/357: [gnugo] Add hook: gnugo-start-game-hook, Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 714d3c9 201/357: [gnugo int] Commentary munging; nfc., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo e019871 206/357: [gnugo] Add abstraction: gnugo-current-player, Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 40f7299 225/357: [gnugo] Fix bug: Ensure gametree sync for -l/--infile., Stefan Monnier, 2020/11/29