[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 01/02: [gnugo int] Decruft: Infer MOVEP from PROPERTY.
From: |
Thien-Thi Nguyen |
Subject: |
[elpa] 01/02: [gnugo int] Decruft: Infer MOVEP from PROPERTY. |
Date: |
Wed, 19 Mar 2014 08:01:55 +0000 |
ttn pushed a commit to branch master
in repository elpa.
commit d83bcbc94034b0e052fcae41062e964ec970dd4f
Author: Thien-Thi Nguyen <address@hidden>
Date: Wed Mar 19 08:59:18 2014 +0100
[gnugo int] Decruft: Infer MOVEP from PROPERTY.
* packages/gnugo/gnugo.el (gnugo-note):
Don't take optional arg MOVEP; instead, infer that
the operation is a move if PROPERTY is ‘:B’ or ‘:W’.
(gnugo-push-move): Update call to ‘gnugo-note’.
---
packages/gnugo/gnugo.el | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/packages/gnugo/gnugo.el b/packages/gnugo/gnugo.el
index e2d9fa0..bc5b2e9 100644
--- a/packages/gnugo/gnugo.el
+++ b/packages/gnugo/gnugo.el
@@ -681,7 +681,7 @@ For all other values of RSEL, do nothing and return nil."
(while (gnugo-board-buffer-p)
(bury-buffer)))
-(defun gnugo-note (property value &optional movep mogrifyp)
+(defun gnugo-note (property value &optional mogrifyp)
(when mogrifyp
(let ((sz (gnugo-get :SZ)))
(cl-labels
@@ -698,7 +698,7 @@ For all other values of RSEL, do nothing and return nil."
(let* ((fruit (list (cons property value)))
(monkey (gnugo-get :monkey))
(loc (aref monkey 0)))
- (if movep
+ (if (memq property '(:B :W))
(let ((mem (aref monkey 1)))
;; todo: do variation check/merge/branch here.
(setcdr loc (list fruit))
@@ -773,7 +773,7 @@ For all other values of RSEL, do nothing and return nil."
(gnugo-put :last-mover color)
(when userp
(gnugo-put :last-user-bpos (and (not passp) (not resignp) move)))
- (gnugo-note (if (string= "black" color) :B :W) move t (not resignp))
+ (gnugo-note (if (string= "black" color) :B :W) move (not resignp))
(when resignp
(gnugo-note :EV "resignation"))
(when start