diff options
| author | John Wiegley <johnw@newartisans.com> | 2002-05-01 00:08:04 +0000 |
|---|---|---|
| committer | John Wiegley <johnw@newartisans.com> | 2002-05-01 00:08:04 +0000 |
| commit | 02e52ee4e13258f4d03c1c8ef4b1c46c59059c01 (patch) | |
| tree | 8ff2e46341baa7cb17aa84499d3bb157ebe11832 | |
| parent | f8d538df5715af48b2712fc5ef1cc1889240afa4 (diff) | |
disable autosaving during login, and determine check/checkmate from
the ics12 move text.
| -rw-r--r-- | chess-ics.el | 12 |
1 files changed, 12 insertions, 0 deletions
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) |
