[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 126/255: sketching out passing
From: |
Eric Schulte |
Subject: |
[elpa] 126/255: sketching out passing |
Date: |
Sun, 16 Mar 2014 01:02:32 +0000 |
eschulte pushed a commit to branch go
in repository elpa.
commit b6b46b019eb091058dbd3ef21cecba8d528034cf
Author: Eric Schulte <address@hidden>
Date: Tue May 29 14:34:32 2012 -0600
sketching out passing
---
back-ends/gtp.el | 12 +++++++-----
go-board.el | 6 ++++--
2 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/back-ends/gtp.el b/back-ends/gtp.el
index 1161b5f..42566f4 100644
--- a/back-ends/gtp.el
+++ b/back-ends/gtp.el
@@ -96,11 +96,13 @@
(signal 'unsupported-back-end-command (list gtp :set-name name)))
(defmethod go-move ((gtp gtp))
- (let ((color (go-color gtp)))
- (gtp-to-pos color
- (case color
- (:B (gtp-command gtp "genmove_black"))
- (:W (gtp-command gtp "genmove_white"))))))
+ (let* ((color (go-color gtp))
+ (move (case color
+ (:B (gtp-command gtp "genmove_black"))
+ (:W (gtp-command gtp "genmove_white")))))
+ (if (string= move "PASS")
+ :pass
+ (gtp-to-pos color move))))
(defmethod set-go-move ((gtp gtp) move)
(gtp-command gtp (go-to-gtp-command move)))
diff --git a/go-board.el b/go-board.el
index e444113..eb9a111 100644
--- a/go-board.el
+++ b/go-board.el
@@ -315,8 +315,10 @@
(interactive "p")
(dotimes (n (or count 1) (or count 1))
(let ((move (go-move *back-end*)))
- (apply-turn-to-board
- (cons move (ignoring-unsupported (go-labels *back-end*))))
+ (if (equal move :pass)
+ (message "pass")
+ (apply-turn-to-board
+ (cons move (ignoring-unsupported (go-labels *back-end*)))))
(mapcar (lambda (tr) (setf (go-move tr) move)) *trackers*)
(goto-char (point-of-pos (cddr move))))
(setf *turn* (other-color *turn*))))
- [elpa] 113/255: uniform igs prefix, (continued)
- [elpa] 113/255: uniform igs prefix, Eric Schulte, 2014/03/15
- [elpa] 109/255: uniform sgf prefix, Eric Schulte, 2014/03/15
- [elpa] 111/255: uniform gtp prefix, Eric Schulte, 2014/03/15
- [elpa] 116/255: moving back-ends into a subdirectory, Eric Schulte, 2014/03/15
- [elpa] 117/255: renaming main API file, Eric Schulte, 2014/03/15
- [elpa] 121/255: better introductory commentary, Eric Schulte, 2014/03/15
- [elpa] 122/255: system-level test combining gnugo and sgf, Eric Schulte, 2014/03/15
- [elpa] 120/255: passing all tests, Eric Schulte, 2014/03/15
- [elpa] 110/255: renaming go-gtp.el to gtp.el, Eric Schulte, 2014/03/15
- [elpa] 125/255: removed dependency on `parse-integer', Eric Schulte, 2014/03/15
- [elpa] 126/255: sketching out passing,
Eric Schulte <=
- [elpa] 124/255: highlighting last move and added pass function, Eric Schulte, 2014/03/15
- [elpa] 123/255: working towards savings games in SGF format, Eric Schulte, 2014/03/15
- [elpa] 127/255: documentation tweaks, Eric Schulte, 2014/03/15
- [elpa] 129/255: igs message types from igs.c, Eric Schulte, 2014/03/15
- [elpa] 118/255: cleanup in go.el, Eric Schulte, 2014/03/15
- [elpa] 130/255: adding a file for tracking development notes, Eric Schulte, 2014/03/15
- [elpa] 128/255: starting to flesh out igs support, Eric Schulte, 2014/03/15
- [elpa] 119/255: test cleanup, Eric Schulte, 2014/03/15
- [elpa] 132/255: moving char-to-num and num-to-char to util, Eric Schulte, 2014/03/15
- [elpa] 115/255: uniform gnugo prefix, Eric Schulte, 2014/03/15