[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 01/01: [gnugo] Dropped command: ‘t’ (gnugo-toggle-dead-group)
From: |
Thien-Thi Nguyen |
Subject: |
[elpa] 01/01: [gnugo] Dropped command: ‘t’ (gnugo-toggle-dead-group) |
Date: |
Mon, 14 Apr 2014 07:09:53 +0000 |
ttn pushed a commit to branch master
in repository elpa.
commit 3aa5d065d5f2cb62c7f11e64f1621d8f4368e129
Author: Thien-Thi Nguyen <address@hidden>
Date: Mon Apr 14 09:13:59 2014 +0200
[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’.
---
packages/gnugo/HACKING | 1 -
packages/gnugo/NEWS | 1 +
packages/gnugo/gnugo.el | 55 -----------------------------------------------
3 files changed, 1 insertions(+), 56 deletions(-)
diff --git a/packages/gnugo/HACKING b/packages/gnugo/HACKING
index a62cff1..9110ef0 100644
--- a/packages/gnugo/HACKING
+++ b/packages/gnugo/HACKING
@@ -8,7 +8,6 @@ This file is both a guide for newcomers and a todo list for
oldstayers.
*** ‘-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/packages/gnugo/NEWS b/packages/gnugo/NEWS
index 4c39fde..fef55f7 100644
--- a/packages/gnugo/NEWS
+++ b/packages/gnugo/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/packages/gnugo/gnugo.el b/packages/gnugo/gnugo.el
index 20474f1..2fa445f 100644
--- a/packages/gnugo/gnugo.el
+++ b/packages/gnugo/gnugo.el
@@ -1733,60 +1733,6 @@ Signal error if done out-of-turn or if game-over."
(gnugo-gate)
(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)