From 02e52ee4e13258f4d03c1c8ef4b1c46c59059c01 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Wed, 1 May 2002 00:08:04 +0000 Subject: disable autosaving during login, and determine check/checkmate from the ics12 move text. --- chess-ics.el | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/chess-ics.el b/chess-ics.el index 509a5ca..ad5a18f 100644 --- a/chess-ics.el +++ b/chess-ics.el @@ -210,6 +210,17 @@ who is black." (car parts))) (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))) + ;; flip field for board orientation: 1 = Black at bottom, 0 = ;; White at bottom. (setq parts (cdr parts)) @@ -295,6 +306,7 @@ who is black." (cond ((eq event 'initialize) (kill-buffer (current-buffer)) + (chess-game-run-hooks game 'disable-autosave) (let ((server (if (= (length chess-ics-server-list) 1) (car chess-ics-server-list) -- cgit v1.2.3