diff options
| author | John Wiegley <johnw@newartisans.com> | 2002-04-13 08:27:24 +0000 |
|---|---|---|
| committer | John Wiegley <johnw@newartisans.com> | 2002-04-13 08:27:24 +0000 |
| commit | 9b3364910b621d1ddbd350300c8da153fdaa2a6e (patch) | |
| tree | 0f823feddd5fe57f72c7eeab1085c1c661714b0a /chess-common.el | |
| parent | acd0fdb7106a8b49f27a74987d28e22315bbc471 (diff) | |
displays and engines now always have a single object associated with
them
Diffstat (limited to 'chess-common.el')
| -rw-r--r-- | chess-common.el | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/chess-common.el b/chess-common.el index 7161e73..9e05c96 100644 --- a/chess-common.el +++ b/chess-common.el @@ -37,8 +37,7 @@ proc)) ((eq event 'ready) - (and (chess-engine-game nil) - (chess-game-set-data (chess-engine-game nil) 'active t))) + (chess-game-set-data chess-engine-game 'active t)) ((eq event 'shutdown) (chess-engine-send nil "quit\n") @@ -58,16 +57,14 @@ ((memq event '(resign abort)) (chess-engine-send nil "new\n") - (and (chess-engine-game nil) - (chess-engine-set-start-position nil))) + (chess-engine-set-position nil)) ((eq event 'undo) - (when (chess-engine-game nil) - (dotimes (i (car args)) - (chess-engine-send nil "undo\n")) - (if (= 1 (mod (car args) 2)) - (chess-engine-send nil "go\n")) - (chess-game-undo (chess-engine-game nil) (car args)))) + (dotimes (i (car args)) + (chess-engine-send nil "undo\n")) + (if (= 1 (mod (car args) 2)) + (chess-engine-send nil "go\n")) + (chess-game-undo chess-engine-game (car args))) ((eq event 'move) (chess-engine-send nil (concat (chess-ply-to-algebraic (car args)) |
