From 0a4f401ba325c52ef9e589cd5c361d2a3a318232 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Wed, 1 May 2002 00:59:38 +0000 Subject: *** no comment *** --- chess-ics.el | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'chess-ics.el') diff --git a/chess-ics.el b/chess-ics.el index 4cc69a7..5b90b19 100644 --- a/chess-ics.el +++ b/chess-ics.el @@ -211,15 +211,16 @@ who is black." (setq parts (cdr parts)) ;; checkmate, etc., is stated in the SAN text - (cond - ((= ?+ (aref move (1- (length move)))) - (chess-pos-set-status position :check)) - ((= ?# (aref move (1- (length move)))) - (chess-pos-set-status position :checkmate)) - (nil - ;; jww (2002-04-30): what about stalemate? do I need to - ;; calculate this each time? - (chess-pos-set-status position :stalemate))) + (when (> (length move) 0) + (cond + ((= ?+ (aref move (1- (length move)))) + (chess-pos-set-status position :check)) + ((= ?# (aref move (1- (length move)))) + (chess-pos-set-status position :checkmate)) + (nil + ;; jww (2002-04-30): what about stalemate? do I need to + ;; calculate this each time? + (chess-pos-set-status position :stalemate)))) ;; flip field for board orientation: 1 = Black at bottom, 0 = ;; White at bottom. -- cgit v1.2.3