From e66b028def9af45cc545c973255df42c9b90cde1 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 12 Apr 2002 07:58:22 +0000 Subject: optimizations and bug fixes --- chess-var.el | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'chess-var.el') diff --git a/chess-var.el b/chess-var.el index a3972af..c33b243 100644 --- a/chess-var.el +++ b/chess-var.el @@ -58,12 +58,10 @@ progress (nil), if it is drawn, resigned, mate, etc." (let ((current-ply (chess-var-ply var)) (changes (chess-ply-changes ply)) (position (chess-ply-pos ply))) + (if (chess-ply-final-p current-ply) + (error "Cannot add moves to a completed game")) (unless (equal position (chess-ply-pos current-ply)) (error "Positions do not match")) - (unless (chess-search-position - position (cadr (chess-ply-changes ply)) - (chess-pos-piece position (car (chess-ply-changes ply)))) - (signal 'chess-illegal "Illegal move")) (chess-ply-set-changes current-ply changes) (chess-var-add-ply var (chess-ply-create (chess-ply-next-pos current-ply))))) -- cgit v1.2.3