[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/gnugo eb13b8e 180/357: [gnugo] Dropped command: ‘t’ (g

From: Stefan Monnier
Subject: [elpa] externals/gnugo eb13b8e 180/357: [gnugo] Dropped command: ‘t’ (gnugo-toggle-dead-group)
Date: Sun, 29 Nov 2020 14:51:16 -0500 (EST)

branch: externals/gnugo
commit eb13b8eb59abce326520ec7c6fde56b3f9390eb5
Author: Thien-Thi Nguyen <ttn@gnu.org>
Commit: Thien-Thi Nguyen <ttn@gnu.org>

    [gnugo] Dropped command: ‘t’ (gnugo-toggle-dead-group)
    This was incomplete and not very useful.
    * packages/gnugo/gnugo.el (gnugo-toggle-dead-group): Delete command.
    (gnugo-board-mode-map): Don't bind ‘t’.
 HACKING  |  1 -
 NEWS     |  1 +
 gnugo.el | 55 -------------------------------------------------------
 3 files changed, 1 insertion(+), 56 deletions(-)

diff --git a/HACKING b/HACKING
index a62cff1..9110ef0 100644
@@ -8,7 +8,6 @@ This file is both a guide for newcomers and a todo list for 
 *** ‘-l FILENAME’ lossage
 ***** silently clobbers other options (PEBKAC, strictly speaking)
 ***** game tree incomplete (doing ‘C-x C-s’ immediately writes empty tree)
-*** [[file:gnugo.el::defun.gnugo-toggle-dead-group][gnugo-toggle-dead-group]] 
only half-complete
 *** no error-handling in SGF parsing
 *** performance -- ‘compare-strings’ approach too clever/slow :-/
 * ideas / wishlist
diff --git a/NEWS b/NEWS
index 4c39fde..fef55f7 100644
--- a/NEWS
+++ b/NEWS
@@ -14,6 +14,7 @@ NB: "RCS: X..Y " means that the particular release includes
     - display "resign" as "resign" in move history (amazing!)
     - avoid clobbering SGF property ‘EV’ on resignation
     - follow main line in subtrees on read
+  - dropped command: ‘t’ (gnugo-toggle-dead-group)
   - PASS for SZ <= 19 normalized to "" on read, written as ""
   - ‘=’ also displays move number of the stone (if any) at that position
   - new keybinding for ‘gnugo-undo-one-move’: M-u
diff --git a/gnugo.el b/gnugo.el
index 20474f1..2fa445f 100644
--- a/gnugo.el
+++ b/gnugo.el
@@ -1733,60 +1733,6 @@ Signal error if done out-of-turn or if game-over."
   (gnugo-display-group-data "dragon_data" "*gnugo dragon data*"))
-(defun gnugo-toggle-dead-group ()
-  "In a GNUGO Board buffer, during game-over, toggle a group as dead.
-The group is selected from current position (point).  Signal error if
-not in game-over or if there is no group at that position.
-In the context of GNU Go, a group is called a \"dragon\" and may be
-composed of more than one \"worm\" (set of directly-connected stones).
-It is unclear to the gnugo.el author whether or not GNU Go supports
- - considering worms as groups in their own right; and
- - toggling group aliveness via GTP.
-Due to these uncertainties, this command is only half complete; the
-changes you may see in Emacs are not propagated to the gnugo subprocess.
-Thus, GTP commands like `final_score' may give unexpected results.
-If you are able to expose via GTP `change_dragon_status' in utils.c,
-you may consider modifying the `gnugo-toggle-dead-group' source code
-to enable full functionality."
-  (interactive)
-  (let ((game-over (or (gnugo-get :game-over)
-                       (user-error "Sorry, game still in play")))
-        (group (or (get-text-property (point) 'group)
-                   (user-error "No stone at that position")))
-        (now (current-time)))
-    (gnugo-put :scoring-seed (logior (ash (logand (car now) 255) 16)
-                                     (cadr now)))
-    (let ((live (assq 'live game-over))
-          (dead (assq 'dead game-over))
-          bef now)
-      (if (memq group live)
-          (setq bef live now dead)
-        (setq bef dead now live))
-      (setcdr bef (delq group (cdr bef)))
-      (setcdr now (cons group (cdr now)))
-      ;; disabled permanently -- too wrong
-      (when nil
-        (cl-flet
-            ((populate (group)
-                       (let ((color (caar group)))
-                         (dolist (stone (cdr group))
-                           (gnugo--play-stone color stone)))))
-          (if (eq now live)
-              (populate group)
-            ;; drastic (and wrong -- clobbers capture info, etc)
-            (gnugo-query "clear_board")
-            (mapc #'populate (cdr live)))))
-      ;; here is the desired interface (to be enabled Some Day)
-      (when nil
-        (gnugo-query "change_dragon_status %s %s"
-                     (cadr group) (if (eq now live)
-                                      'alive
-                                    'dead)))))
-  (save-excursion
-    (gnugo-refresh)))
 (defun gnugo-estimate-score ()
   "Display estimated score of a game of GNU Go.
 Output includes number of stones on the board and number of stones
@@ -2521,7 +2467,6 @@ starting a new one.  See `gnugo-board-mode' documentation 
for more info."
           ("W"        . gnugo-worm-data)
           ("d"        . gnugo-dragon-stones)
           ("D"        . gnugo-dragon-data)
-          ("t"        . gnugo-toggle-dead-group)
           ("g"        . gnugo-toggle-grid)
           ("!"        . gnugo-estimate-score)
           (":"        . gnugo-command)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]