summaryrefslogtreecommitdiff
path: root/chess-engine.el
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2002-04-09 09:07:48 +0000
committerJohn Wiegley <johnw@newartisans.com>2002-04-09 09:07:48 +0000
commit0d88aacaee63aa887b089e963103aa3f1cef4891 (patch)
tree61bf9923b82244ef666d434c7c1153b66ae3eade /chess-engine.el
parent5ff62250fe5b4e2dbda138aa5873f9dd6fb2c585 (diff)
*** no comment ***
Diffstat (limited to 'chess-engine.el')
-rw-r--r--chess-engine.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/chess-engine.el b/chess-engine.el
index 83416514..5c556aa 100644
--- a/chess-engine.el
+++ b/chess-engine.el
@@ -62,6 +62,11 @@
(let ((chess-engine-handling-event t))
(cond
((eq event 'move)
+ ;; if the game index is still 0, then our opponent is white, and
+ ;; we need to pass over the move
+ (if (= (chess-game-index (chess-engine-game nil)) 0)
+ (chess-game-run-hooks (chess-engine-game nil) 'pass))
+
(let ((ply (chess-algebraic-to-ply (chess-engine-position nil)
(car args))))
(if ply