[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/gnugo 35c4645 347/357: [gnugo] Make ‘C-u F’ store addi
From: |
Stefan Monnier |
Subject: |
[elpa] externals/gnugo 35c4645 347/357: [gnugo] Make ‘C-u F’ store additional SGF properties. |
Date: |
Sun, 29 Nov 2020 14:51:54 -0500 (EST) |
branch: externals/gnugo
commit 35c4645ac11c4c0d4e3700e89e802f5743035425
Author: Thien-Thi Nguyen <ttn@gnu.org>
Commit: Thien-Thi Nguyen <ttn@gnu.org>
[gnugo] Make ‘C-u F’ store additional SGF properties.
* packages/gnugo/gnugo.el (gnugo-display-final-score):
When invoked w/ prefix arg, store also in last node, the SGF
properties ‘TB’, ‘TW’, ‘MA’ and ‘DD’ with respective values,
each a list of points, for black territory, white territory,
seki stones, and dead stones. However, if a particular list
is empty, delete that property from the node.
---
gnugo.el | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/gnugo.el b/gnugo.el
index 1583228..59e14a4 100644
--- a/gnugo.el
+++ b/gnugo.el
@@ -1791,6 +1791,7 @@ to the last move, as a comment."
(w= " White = ")
(res (when (gnugo--resignp (gnugo-move-history 'car))
(gnugo-get :last-mover)))
+ (seed (gnugo-get :scoring-seed))
blurb result)
(if res
(setq blurb (list
@@ -1805,7 +1806,6 @@ to the last move, as a comment."
(let* ((g-over (gnugo-get :game-over))
(live (gnugo-aqr 'live g-over))
(dead (gnugo-aqr 'dead g-over))
- (seed (gnugo-get :scoring-seed))
(terr-q (format "final_status_list %%s_territory %d" seed))
(terr "territory")
(capt "captures")
@@ -1872,6 +1872,18 @@ to the last move, as a comment."
(gnugo--set-root-prop :RE result)
(when comment
(let ((node (car (aref (gnugo-get :monkey) 0))))
+ (cl-loop
+ for (prop . what) in '((:TB . black_territory)
+ (:TW . white_territory)
+ (:MA . seki)
+ (:DD . dead))
+ do (let ((ls (gnugo-lsquery "final_status_list %s %s"
+ what seed)))
+ (delq (assq prop node) node)
+ (when ls
+ (gnugo--decorate
+ node prop (mapcar (gnugo--as-cc-func)
+ ls)))))
(gnugo--decorate
(delq (assq :C node) node)
:C
- [elpa] externals/gnugo c5ef13d 334/357: [gnugo] Make ‘gnugo-goto-pos’ return buffer position., (continued)
- [elpa] externals/gnugo c5ef13d 334/357: [gnugo] Make ‘gnugo-goto-pos’ return buffer position., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 6170d2a 333/357: [gnugo] Make ‘C-c C-p’ output more spacious., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 0320a5c 335/357: [gnugo int] Decruft: Don't bother w/ ‘group’ text property., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 8123275 338/357: [gnugo] Drop trailing fullstop in animation message., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 08f11af 339/357: [gnugo int] Incorporate ‘gnugo-toggle-image-display’ into unique caller., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 1e01c65 340/357: [gnugo] When sorry, say "Sorry" first., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 3541ccf 343/357: [gnugo int] Lift redundant pall of death computation., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 38b2529 124/357: [gnugo int] Add abstraction: gnugo--mkht, Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 0f9f540 125/357: [gnugo int] Maintain tree MNUM., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 7211950 346/357: [gnugo] Indicate seki groups on the board., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 35c4645 347/357: [gnugo] Make ‘C-u F’ store additional SGF properties.,
Stefan Monnier <=
- [elpa] externals/gnugo 0c4b37b 349/357: [gnugo] Document new ‘C-u F’ behavior., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo e66bfa0 352/357: [gnugo int] Gate ‘cursor-intangible-mode’ call precisely, Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 2f73382 353/357: [gnugo] Add some docstrings to some vars/funcs., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo eb9748f 355/357: [gnugo maint] Update years in copyright notice; nfc., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 2dd0aca 357/357: * .gitignore: New file, Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo ee905ef 048/357: [gnugo] Fix bug: Compute grid spacing using offset math., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 566623c 121/357: [gnugo int] Invert ‘if’ CONDITION and THEN/ELSE clauses., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 19309c3 139/357: [gnugo frolic] Handle invalid branch more consistently., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo d214e7e 137/357: [gnugo frolic] Add command to set the main line., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo dd42857 148/357: [gnugo frolic] Set ‘truncate-lines’., Stefan Monnier, 2020/11/29