[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 250/255: mark dead stones at end of game
From: |
Eric Schulte |
Subject: |
[elpa] 250/255: mark dead stones at end of game |
Date: |
Sun, 16 Mar 2014 01:02:57 +0000 |
eschulte pushed a commit to branch go
in repository elpa.
commit d127d39d34392eb54627fee0cfb85a35fc231fb2
Author: Eric Schulte <address@hidden>
Date: Sat Aug 24 17:02:57 2013 -0600
mark dead stones at end of game
---
go-board.el | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/go-board.el b/go-board.el
index 6ed29e9..f459b96 100644
--- a/go-board.el
+++ b/go-board.el
@@ -401,12 +401,22 @@
(setf *turn* (other-color *turn*))
(when *autoplay*
(when (equalp :pass (go-board-next))
+ ;; mark open points
(mapc (lambda (move)
(go-board-mark-point (point-of-pos (cddr move))
(go-board-cross (ecase (car move)
(:B 'black)
(:W 'white)))))
(with-backends back (go-territory back)))
+ ;; mark dead stones
+ (mapc (lambda (move)
+ (let* ((point (point-of-pos (cddr move)))
+ (color (car (get-text-property point :type))))
+ (go-board-mark-point point
+ (go-board-cross (ecase color
+ (:black 'white)
+ (:white 'black))))))
+ (with-backends back (go-dead back)))
(message "final score: %s" (with-backends back (go-score back)))))))
(defun go-board-undo (&optional num)
- [elpa] 237/255: thoughts about browser-based implementation, (continued)
- [elpa] 237/255: thoughts about browser-based implementation, Eric Schulte, 2014/03/15
- [elpa] 236/255: factor general comint utils out of igs.el, Eric Schulte, 2014/03/15
- [elpa] 192/255: two consecutive passes ends the game, Eric Schulte, 2014/03/15
- [elpa] 210/255: using curry, rcurry and compose helpers, Eric Schulte, 2014/03/15
- [elpa] 203/255: adding GPL copyright file, Eric Schulte, 2014/03/15
- [elpa] 243/255: undo through gtp pipe, Eric Schulte, 2014/03/15
- [elpa] 246/255: customizable default gnugo options, Eric Schulte, 2014/03/15
- [elpa] 241/255: igs class definitions up front for better loading, Eric Schulte, 2014/03/15
- [elpa] 247/255: notes, Eric Schulte, 2014/03/15
- [elpa] 235/255: better line truncation, Eric Schulte, 2014/03/15
- [elpa] 250/255: mark dead stones at end of game,
Eric Schulte <=
- [elpa] 229/255: igs TODO: consistent game un-observation, Eric Schulte, 2014/03/15
- [elpa] 242/255: need assoc for aget, Eric Schulte, 2014/03/15
- [elpa] 228/255: refresh the game list buffer, Eric Schulte, 2014/03/15
- [elpa] 211/255: scale column width by buffer width, Eric Schulte, 2014/03/15
- [elpa] 233/255: igs handle adjourned and resigned games, Eric Schulte, 2014/03/15
- [elpa] 244/255: igs-pipe handles resignation and comments, Eric Schulte, 2014/03/15
- [elpa] 245/255: misc fixes, Eric Schulte, 2014/03/15
- [elpa] 169/255: igs: automatically collect a game listing, Eric Schulte, 2014/03/15
- [elpa] 248/255: try to fix gnugo Emacs crashes, Eric Schulte, 2014/03/15
- [elpa] 254/255: re-format README, Eric Schulte, 2014/03/15