[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/gnugo 1b69add 160/357: [gnugo int] Decruft: Drop gametr
From: |
Stefan Monnier |
Subject: |
[elpa] externals/gnugo 1b69add 160/357: [gnugo int] Decruft: Drop gametree IR element: KIDS |
Date: |
Sun, 29 Nov 2020 14:51:12 -0500 (EST) |
branch: externals/gnugo
commit 1b69addcdc739330cd0b622e0eed7e5b04506556
Author: Thien-Thi Nguyen <ttn@gnu.org>
Commit: Thien-Thi Nguyen <ttn@gnu.org>
[gnugo int] Decruft: Drop gametree IR element: KIDS
* packages/gnugo/gnugo.el (gnugo-describe-internal-properties): Update.
(gnugo/sgf-create TREE): Don't take 3rd arg KIDS;
don't do multiple-kids detection / stashing.
(gnugo/sgf-create): Omit KIDS from rv.
---
gnugo.el | 21 +++++----------------
1 file changed, 5 insertions(+), 16 deletions(-)
diff --git a/gnugo.el b/gnugo.el
index 415ba7d..c225fc7 100644
--- a/gnugo.el
+++ b/gnugo.el
@@ -283,8 +283,6 @@ Handle the big, slow-to-render, and/or uninteresting ones
specially."
(:sgf-gametree
(list (hash-table-count
(gnugo--tree-mnum val))
- (hash-table-count
- (aref val 3))
(gnugo--tree-ends val)))
(:monkey
(let ((mem (aref val 0)))
@@ -2577,9 +2575,7 @@ A collection is a list of gametrees, each a vector of
four elements:
MNUM -- `eq' hash: node to move numbers; non-\"move\" nodes
have a move number of the previous \"move\" node (or zero)
- ROOT -- the root node
-
- KIDS -- `eq' hash: node to node list (branch points only)"
+ ROOT -- the root node"
;; Arg names inspired by `create-image', despite -P being frowned upon.
(let ((keywords (or (get 'gnugo/sgf-*r4-properties* :keywords)
(put 'gnugo/sgf-*r4-properties* :keywords
@@ -2691,7 +2687,7 @@ A collection is a list of gametrees, each a vector of
four elements:
(when (eq :SZ (car prop))
(setq SZ (cdr prop)))
prop))))
- (TREE (parent mnum kids)
+ (TREE (parent mnum)
(let ((ls parent)
prev node)
(seek-into ?\()
@@ -2703,9 +2699,6 @@ A collection is a list of gametrees, each a vector of
four elements:
0)
(gethash prev mnum 0))
mnum)
- ;; phase 2
- (when (listp (gethash prev kids t))
- (push node (gethash prev kids)))
(push node
ls))
(prog1
@@ -2713,10 +2706,8 @@ A collection is a list of gametrees, each a vector of
four elements:
;; singular
(list ls)
;; multiple
- ;; phase 1
- (puthash node (list) kids)
(loop while (seek ?\()
- append (TREE ls mnum kids)))
+ append (TREE ls mnum)))
(seek-into ?\))))))
(with-temp-buffer
(if (not data-p)
@@ -2725,13 +2716,11 @@ A collection is a list of gametrees, each a vector of
four elements:
(goto-char (point-min)))
(loop while (morep)
collect (let* ((mnum (gnugo--mkht :weakness 'key))
- (kids (gnugo--mkht))
- (ends (TREE nil mnum kids))
+ (ends (TREE nil mnum))
(root (car (last (car ends)))))
(vector (apply 'vector ends)
mnum
- root
- kids)))))))
+ root)))))))
(defun gnugo/sgf-write-file (collection filename)
(let ((aft-newline-appreciated '(:AP :GN :PB :PW :HA :KM :RU :RE))
- [elpa] externals/gnugo da98bc8 288/357: [gnugo int] Replace COND expression w/ IF., (continued)
- [elpa] externals/gnugo da98bc8 288/357: [gnugo int] Replace COND expression w/ IF., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 26c849f 330/357: [gnugo int] Decruft: Don't declare hook and keymap vars., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo b5b3fd6 337/357: [gnugo int] Reduce ‘setq’ usage., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo c885c9c 020/357: [gnugo int] Avoid variable FORMAT for ‘message’., Stefan Monnier, 2020/11/29
- [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 <=
- [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, 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