summaryrefslogtreecommitdiff
path: root/chess-ics.el
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2002-04-13 08:27:24 +0000
committerJohn Wiegley <johnw@newartisans.com>2002-04-13 08:27:24 +0000
commit9b3364910b621d1ddbd350300c8da153fdaa2a6e (patch)
tree0f823feddd5fe57f72c7eeab1085c1c661714b0a /chess-ics.el
parentacd0fdb7106a8b49f27a74987d28e22315bbc471 (diff)
displays and engines now always have a single object associated with
them
Diffstat (limited to 'chess-ics.el')
-rw-r--r--chess-ics.el30
1 files changed, 15 insertions, 15 deletions
diff --git a/chess-ics.el b/chess-ics.el
index 5bd9639..96a410d 100644
--- a/chess-ics.el
+++ b/chess-ics.el
@@ -126,25 +126,25 @@ who is black."
(let ((chess-engine-handling-event t)
(begin (match-beginning 1))
(end (match-end 1))
- (info (chess-ics12-parse (match-string 3)))
- (game (chess-engine-game nil)))
- (assert game)
- (if (and (chess-game-data game 'active)
- (> (chess-game-index game) 0))
+ (info (chess-ics12-parse (match-string 3))))
+ (if (and (chess-game-data chess-engine-game 'active)
+ (> (chess-game-index chess-engine-game) 0))
(when (and (cadr info)
(eq (chess-pos-side-to-move (car info))
- (chess-game-data game 'my-color)))
- (chess-engine-do-move
- (chess-algebraic-to-ply
- (chess-ply-pos (car (last (chess-game-plies game))))
- (cadr info) t))
+ (chess-game-data chess-engine-game 'my-color)))
+ (chess-game-move chess-engine-game
+ (chess-algebraic-to-ply
+ (chess-ply-pos
+ (car (last (chess-game-plies chess-engine-game))))
+ (cadr info) t))
(assert (equal (car info) (chess-engine-position nil))))
(let ((chess-game-inhibit-events t) plies)
- (chess-game-set-data game 'my-color (string= (nth 2 info)
- chess-ics-handle))
- (chess-game-set-data game 'active t)
- (chess-game-set-start-position game (car info)))
- (chess-game-run-hooks game 'orient))
+ (chess-game-set-data chess-engine-game
+ 'my-color (string= (nth 2 info)
+ chess-ics-handle))
+ (chess-game-set-data chess-engine-game 'active t)
+ (chess-game-set-start-position chess-engine-game (car info)))
+ (chess-game-run-hooks chess-engine-game 'orient))
(delete-region begin end)
t))