[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 249/255: adding `go-dead' to the API
From: |
Eric Schulte |
Subject: |
[elpa] 249/255: adding `go-dead' to the API |
Date: |
Sun, 16 Mar 2014 01:02:57 +0000 |
eschulte pushed a commit to branch go
in repository elpa.
commit ec341609addd29bc6ee97e347adab7bfb427973a
Author: Eric Schulte <address@hidden>
Date: Sat Aug 24 17:02:49 2013 -0600
adding `go-dead' to the API
---
back-ends/gnugo.el | 7 +++++++
back-ends/gtp.el | 3 +++
back-ends/igs.el | 3 +++
back-ends/sgf.el | 3 +++
go-api.el | 1 +
5 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/back-ends/gnugo.el b/back-ends/gnugo.el
index 7feefcc..2a60773 100644
--- a/back-ends/gnugo.el
+++ b/back-ends/gnugo.el
@@ -107,4 +107,11 @@ For example, the following changes the level of gnugo.
(defmethod set-player-name ((gnugo gnugo) color name)
(signal 'unsupported-back-end-command (list gnugo :set-player-name name)))
+(defmethod go-dead ((gnugo gnugo))
+ (mapcar (lambda (gtp-point) (gtp-to-pos nil gtp-point))
+ (mapcar #'symbol-name
+ (read (format "(%s)"
+ (gnugo-command-to-string
+ gnugo "final_status_list dead"))))))
+
(provide 'gnugo)
diff --git a/back-ends/gtp.el b/back-ends/gtp.el
index daeb3f0..7fc8f2a 100644
--- a/back-ends/gtp.el
+++ b/back-ends/gtp.el
@@ -162,4 +162,7 @@
(defmethod go-territory ((gtp gtp))
(append (gtp-territory gtp :B) (gtp-territory gtp :W)))
+(defmethod go-dead ((gtp gtp))
+ (signal 'unsupported-back-end-command (list gtp :dead)))
+
(provide 'gtp)
diff --git a/back-ends/igs.el b/back-ends/igs.el
index 88cccce..b0dca97 100644
--- a/back-ends/igs.el
+++ b/back-ends/igs.el
@@ -226,6 +226,9 @@ This is used to re-send messages to keep the IGS server
from timing out.")
(defmethod go-territory ((igs igs))
(signal 'unsupported-back-end-command (list igs :territory)))
+(defmethod go-dead ((igs igs))
+ (signal 'unsupported-back-end-command (list igs :dead)))
+
(defmacro igs-w-proc (proc &rest body)
(declare (indent 1))
`(with-current-buffer (process-buffer proc) ,@body))
diff --git a/back-ends/sgf.el b/back-ends/sgf.el
index 6048dc3..aa1b838 100644
--- a/back-ends/sgf.el
+++ b/back-ends/sgf.el
@@ -194,4 +194,7 @@
(defmethod go-territory ((sgf sgf))
(signal 'unsupported-back-end-command (list sgf :territory)))
+(defmethod go-dead ((sgf sgf))
+ (signal 'unsupported-back-end-command (list sgf :dead)))
+
(provide 'sgf)
diff --git a/go-api.el b/go-api.el
index 45908c4..f62af72 100644
--- a/go-api.el
+++ b/go-api.el
@@ -77,5 +77,6 @@
(defgeneric go-quit (back-end) "Quit the BACK-END.")
(defgeneric go-score (back-end) "Ask BACK-END to report the score.")
(defgeneric go-territory (back-end) "Ask BACK-END to report the territory.")
+(defgeneric go-dead (back-end) "Ask BACK-END to dead stones.")
(provide 'go-api)
- [elpa] 227/255: TODO retain comments, (continued)
- [elpa] 227/255: TODO retain comments, Eric Schulte, 2014/03/15
- [elpa] 231/255: refresh message, Eric Schulte, 2014/03/15
- [elpa] 239/255: backend for GTP through arbitrary process, Eric Schulte, 2014/03/15
- [elpa] 232/255: gtp-num-to-char is being called but is undefined, Eric Schulte, 2014/03/15
- [elpa] 234/255: don't truncate lines in go boards, Eric Schulte, 2014/03/15
- [elpa] 221/255: organize notes, Eric Schulte, 2014/03/15
- [elpa] 180/255: scattered changes from a while ago, Eric Schulte, 2014/03/15
- [elpa] 252/255: fix copyright headers, Eric Schulte, 2014/03/15
- [elpa] 251/255: Add 'packages/el-go/' from commit 'd127d39d34392eb54627fee0cfb85a35fc231fb2', Eric Schulte, 2014/03/15
- [elpa] 255/255: adding file-ending comments to all source files, Eric Schulte, 2014/03/15
- [elpa] 249/255: adding `go-dead' to the API,
Eric Schulte <=
- [elpa] 218/255: call functions when pressing enter on the list, Eric Schulte, 2014/03/15
- [elpa] 230/255: optionally ignore IGS shouts, Eric Schulte, 2014/03/15