diff options
| author | John Wiegley <johnw@newartisans.com> | 2002-04-11 01:06:10 +0000 |
|---|---|---|
| committer | John Wiegley <johnw@newartisans.com> | 2002-04-11 01:06:10 +0000 |
| commit | 3375c5ff17acb3e9af7f2c011a6961e0623d02ad (patch) | |
| tree | a4d175e47627b7d2245893a0ad2334249739853a /chess-crafty.el | |
| parent | da4dceb58f252519caae28e3b2e049a5bd74c098 (diff) | |
added undo support
Diffstat (limited to 'chess-crafty.el')
| -rw-r--r-- | chess-crafty.el | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/chess-crafty.el b/chess-crafty.el index b14db83..880ee14 100644 --- a/chess-crafty.el +++ b/chess-crafty.el @@ -87,6 +87,12 @@ (and (chess-engine-game nil) (chess-engine-set-start-position nil))) + ((eq event 'undo) + (when (chess-engine-game nil) + (dotimes (i (car args)) + (chess-engine-send nil "undo\n")) + (chess-game-undo (chess-engine-game nil) (car args)))) + ((eq event 'move) (chess-engine-send nil (concat (chess-ply-to-algebraic (car args)) "\n"))))) |
