From 3375c5ff17acb3e9af7f2c011a6961e0623d02ad Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 11 Apr 2002 01:06:10 +0000 Subject: added undo support --- chess-phalanx.el | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'chess-phalanx.el') diff --git a/chess-phalanx.el b/chess-phalanx.el index 7b902a4..0eb3ae0 100644 --- a/chess-phalanx.el +++ b/chess-phalanx.el @@ -57,6 +57,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"))))) -- cgit v1.2.3