diff options
| author | John Wiegley <johnw@newartisans.com> | 2002-04-12 11:09:04 +0000 |
|---|---|---|
| committer | John Wiegley <johnw@newartisans.com> | 2002-04-12 11:09:04 +0000 |
| commit | 30692f15986c90f7b776c83e2de142738d6161d6 (patch) | |
| tree | 18c7796f3cdcd99d757eed75af8ff3f692ad60d8 /chess-ics.el | |
| parent | ee6f32e0f33a42f09aca27d00d57c22f35192c76 (diff) | |
*** no comment ***
Diffstat (limited to 'chess-ics.el')
| -rw-r--r-- | chess-ics.el | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/chess-ics.el b/chess-ics.el index 9cc8933..300ecaf 100644 --- a/chess-ics.el +++ b/chess-ics.el @@ -129,23 +129,24 @@ who is black." (info (chess-ics12-parse (match-string 3))) (game (chess-engine-game nil))) (assert game) - (unwind-protect - (if (and (chess-game-data game 'active) - (> (chess-game-index game) 0)) - (if (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))) - (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)) - (delete-region begin end)) + (if (and (chess-game-data game 'active) + (> (chess-game-index 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)) + (assert (equal (chess-engine-position nil) + (car info)))) + (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)) + (delete-region begin end) t)) (defvar chess-ics-regexp-alist |
