diff options
| author | John Wiegley <johnw@newartisans.com> | 2002-04-24 19:37:35 +0000 |
|---|---|---|
| committer | John Wiegley <johnw@newartisans.com> | 2002-04-24 19:37:35 +0000 |
| commit | cba1f276a6c2b7b7d70db74ca5b8af4d341864d7 (patch) | |
| tree | ea6cde75ab7825c6a2ee32c2bee44a63ed056b43 /chess-ics.el | |
| parent | 6f87d139a4e19a318de49905bbb1176ee1de33a8 (diff) | |
*** no comment ***
Diffstat (limited to 'chess-ics.el')
| -rw-r--r-- | chess-ics.el | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/chess-ics.el b/chess-ics.el index 6de470a..39bae50 100644 --- a/chess-ics.el +++ b/chess-ics.el @@ -160,26 +160,25 @@ who is black." (let ((chess-engine-handling-event t) (begin (match-beginning 0)) (end (match-end 0)) - (info (chess-ics12-parse (match-string 1)))) - (if (and (chess-game-data (chess-engine-game nil) 'active) - (> (chess-engine-index nil) 0)) + (info (chess-ics12-parse (match-string 1))) + (game (chess-engine-game nil))) + (if (chess-game-data game 'active) (when (and (cadr info) (eq (chess-pos-side-to-move (car info)) - (chess-game-data (chess-engine-game nil) 'my-color))) - (let* ((game (chess-engine-game nil)) - (ply (chess-algebraic-to-ply - (chess-ply-pos (car (last (chess-game-plies game)))) - (cadr info) t))) + (chess-game-data game 'my-color))) + (let ((ply (chess-algebraic-to-ply + (chess-ply-pos (car (last (chess-game-plies game)))) + (cadr info) t))) (chess-game-set-data game 'white-remaining (nth 4 info)) (chess-game-set-data game 'black-remaining (nth 5 info)) (chess-game-move game ply)) (assert (equal (car info) (chess-engine-position nil)))) (let ((chess-game-inhibit-events t) plies) - (chess-game-set-data (chess-engine-game nil) - 'my-color (string= (nth 2 info) chess-ics-handle)) - (chess-game-set-data (chess-engine-game nil) 'active t) - (chess-game-set-start-position (chess-engine-game nil) (car info))) - (chess-game-run-hooks (chess-engine-game nil) 'orient)) + (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)) (goto-char begin) (delete-region begin end) ;; we need to counter the `forward-line' in `chess-engine-filter' |
