[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/gnugo abb12ef 345/357: [gnugo] Include seki groups in g
From: |
Stefan Monnier |
Subject: |
[elpa] externals/gnugo abb12ef 345/357: [gnugo] Include seki groups in game-over data. |
Date: |
Sun, 29 Nov 2020 14:51:54 -0500 (EST) |
branch: externals/gnugo
commit abb12efe493a3b7d3c72451968f7e0634f963375
Author: Thien-Thi Nguyen <ttn@gnu.org>
Commit: Thien-Thi Nguyen <ttn@gnu.org>
[gnugo] Include seki groups in game-over data.
* packages/gnugo/gnugo.el (gnug-put): Update :game-over doc blurb.
(gnugo-close-game): For resignation case, add empty ‘seki’
to game-over data. For non-resignation case, use GTP command
"final_status_list seki" to obtain a list of seki stones;
collect a group under alist key ‘seki’ if it appears in this list.
---
gnugo.el | 25 ++++++++++++++++---------
1 file changed, 16 insertions(+), 9 deletions(-)
diff --git a/gnugo.el b/gnugo.el
index c302774..82da129 100644
--- a/gnugo.el
+++ b/gnugo.el
@@ -245,8 +245,8 @@ you may never really understand to any degree of personal
satisfaction\".
:diamond -- the part of the subprocess name after \"gnugo\", may be \"\"
- :game-over -- nil until game over at which time its value is set to
- the alist ((live GROUP ...) (dead GROUP ...))
+ :game-over -- nil until game over at which time its value is set to the
+ alist ((live GROUP ...) (seki GROUP ...) (dead GROUP ...))
:sgf-collection -- after a `loadsgf' command, entire parse tree of file,
a simple list of one or more gametrees, updated in
@@ -855,24 +855,31 @@ For all other values of RSEL, do nothing and return nil."
"\n"))))
(append (ls "black")
(ls "white"))))
+ (seki)
(dead))
(cl-loop
+ with flat-seki = (gnugo-lsquery "final_status_list seki")
with dd = (gnugo-query "dragon_data")
with start = 0
- with (live dead)
+ with (live seki dead)
while (string-match "\\(.+\\):\n[^ ]+[ ]+\\(black\\|white\\)\n"
dd start)
- do (let ((ent (group (match-string 2 dd)
- (gnugo-lsquery "dragon_stones %s"
- (match-string 1 dd)))))
+ do (let* ((mem (match-string 1 dd))
+ (ent (group (match-string 2 dd)
+ (gnugo-lsquery "dragon_stones %s"
+ mem))))
(string-match "\nstatus[ ]+\\(\\(ALIVE\\)\\|[A-Z]+\\)\n"
dd start)
- (if (match-string 2 dd)
- (push ent live)
- (push ent dead))
+ (cond ((member mem flat-seki)
+ (push ent seki))
+ ((match-string 2 dd)
+ (push ent live))
+ (t
+ (push ent dead)))
(setq start (match-end 0)))
finally return
`((live ,@live)
+ (seki ,@seki)
(dead ,@dead)))))))
(defun gnugo--unclose-game ()
- [elpa] externals/gnugo 7478f81 302/357: [gnugo int] Bump required ‘xpm’ version to "1.0.1"., (continued)
- [elpa] externals/gnugo 7478f81 302/357: [gnugo int] Bump required ‘xpm’ version to "1.0.1"., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo f1c7c8d 319/357: [gnugo int] Fix verse meter; nfc., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo da8901f 314/357: [gnugo] Release: 3.0.1, Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo a667440 298/357: [gnugo int] Fix up gnugo-frolic.el ‘require’ forms., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo abd1fa0 315/357: [gnugo int] Use ‘replace-regexp-in-string’., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 2e6bbe5 300/357: [gnugo int] Whitespace, comment munging; nfc., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo c0f6ed5 328/357: [gnugo int] Comment munging; nfc., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo cf36ccd 331/357: [gnugo int] Whitespace munging; nfc., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo a70a854 336/357: [gnugo] Add abstraction: gnugo-aqr, Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 1eb43f1 342/357: [gnugo int] Add abstraction: gnugo--zonk-ovs, Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo abb12ef 345/357: [gnugo] Include seki groups in game-over data.,
Stefan Monnier <=
- [elpa] externals/gnugo 82c5b64 351/357: [gnugo imgen] New fit func to ignore bottom grid line, Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 152c53c 354/357: [gnugo] Move two funcs internal., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 5566285 026/357: [gnugo] Give names and docstrings to ‘lambda’ commands., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 62a7c8d 052/357: [gnugo slog] Specify second arg to ‘unintern’., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo eae8444 113/357: [gnugo int] Specify STREAM to ‘pp’ directly., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 00ae088 120/357: [gnugo int] Use ‘gnugo--tree-ends’ more., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo fa99b79 134/357: [gnugo int] Make ‘gnugo-board-buffer-p’ precise., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 8f99c83 151/357: [gnugo frolic int] Don't bother to awake w/ ‘col’., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 283534a 157/357: [gnugo sgf int] Consolidate loops., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 671d7aa 147/357: [gnugo frolic] Sync column headers w/ buffer text; handle offsets., Stefan Monnier, 2020/11/29