Mario Lang [Sun, 22 Feb 2004 19:32:27 +0000 (19:32 +0000)]
(chess-ics-ads-removed): We need to be a lot more careful when
deleteing stuff on a preoutput-filter-function. Fixed this, which also
fixes all the remaining cases of missed boards. LectureBot
ran through three Lectures without any bug, which seems good!
Mario Lang [Sun, 22 Feb 2004 13:25:13 +0000 (13:25 +0000)]
Require 'rx when compiling.
(chess-ics-style12-regexp): New constant regexp which matches
a style12 string (subgroup 1 to 32).
(chess-ics-matcher-alist): Use it.
(chess-ics-matcher-alist): Destroy game object if we see a
"no longer examining..." message.
(chess-ics-handle-style12): Rewrite using `match-string' instead of
`pop' based on the new regexp above.
(chess-ics-handle-style12): No longer `message' parse errors, rather
keep the failed board in the buffer, and add the failure info
to the front of the line. Makes finding remaining bugs a lot
easier since the buffer can be reviewed in chronological order.
Mario Lang [Sun, 22 Feb 2004 13:01:26 +0000 (13:01 +0000)]
(chess-engine-filter): We were calling `forward-line'
unconditionally. However, there is a race condition, namely,
if the last line does not end with a newline, forward-line
will skip to eob, therefore, engine regexps will simply
be missed. Fixed.
(chess-engine-entire-lines): This was a fix for the wrong problem,
removed.
John Wiegley [Sun, 8 Feb 2004 23:53:28 +0000 (23:53 +0000)]
There is no longer a `byte-compiling-files-p' function on Emacs 21.3.
At least, it's not on mine. Another way needs to be found to stub
about assert calls in the byte-compiled chess.el.
Mario Lang [Fri, 6 Feb 2004 11:18:57 +0000 (11:18 +0000)]
(chess-puzzle): Disable autosave.
(chess-puzzle-show-solution): New function (bound to ? in puzzle
displays) for showing a solution (if one is known). This typically
only works for EPD databases with either bm or pv information.
Displaying of annotations is not yet done.
Mario Lang [Thu, 5 Feb 2004 22:07:16 +0000 (22:07 +0000)]
(chess-game-to-epd): New defsubst to convert a game
object to an EPD string (or insert it).
(chess-epd-to-game): Analogous to the above.
(chess-epd-parse): Use `chess-fen-regexp'.
Mario Lang [Thu, 5 Feb 2004 22:05:04 +0000 (22:05 +0000)]
Handle .epd and .pgn files in the chess-file module. Achieved by
setting a buffer-local variable chess-file-type to either 'pgn or 'epd
on 'open, and use this info to dispatch correctly.
This change makes it possible to load .epd files with the
chess-puzzle function for instance.
Mario Lang [Thu, 5 Feb 2004 14:38:34 +0000 (14:38 +0000)]
sort of pseudobarf on refresh to easy finding of the obscure observe bug, and set back-moved-first game-data always, so that it even works if a game is reset to a new starting position
Mario Lang [Tue, 3 Feb 2004 19:00:55 +0000 (19:00 +0000)]
(chess-ics-initial-commands): New defcustom to make
the init-strings sent after login configurable.
(chess-ics-movelist-start-position): New buffer-local variable
which defaults to `chess-starting-position'. Its value (if non-nil)
is used to initialize the board when seeing a movelist header.
This is to allow for servers which have the equivalent of
"iset startpos 1" on FICS, which tells the server to automatically
send the initial position before sending a movelist. This is
to allow non-standard starting positions, and still maintain
complete game information in the game object locally.
(chess-ics-matcher-alist): If we see something like "startpos set",
we set chess-ics-movelist-start-position to nil.
(chess-ics-handle-style12): Renamed from chess-ics-handle-ics12.
Set game-data 'black-moved-first to t if we see a initial board
(move is "none"), and side-to-move is Black. Use this information
to calculate the correct game index from the supplied game sequence.
This fixes observing of arbitrary start position games where
Black moved first. (Most of LectureBot should work now).
(chess-ics-seeking): Handle "set ptime 1" prompts.
(chess-ics-ads-removed): Ditto.
Mario Lang [Mon, 2 Feb 2004 14:40:34 +0000 (14:40 +0000)]
iset startpos 1 makes requesting the movelist work for
games which were started from bsetup positions.
Attempt to route kibitzes to chess-announce.
Some other fixes to increase ICC compatibility.
Mario Lang [Sat, 31 Jan 2004 20:39:01 +0000 (20:39 +0000)]
Now finally handle seek announcements and removals.
THis time, we put stuff in comint-preoutput-filter-functions
to save lots of unnecessary regexp matches.
Mario Lang [Wed, 28 Jan 2004 21:26:37 +0000 (21:26 +0000)]
(chess-ply-castling-changes): When doing a long castle, only check if
the king can move to the d or c file without being in check. According
to the crafty-list, it is legal to do a long castle if some opponent piece
is attacking the b file.
Mario Lang [Wed, 28 Jan 2004 16:48:02 +0000 (16:48 +0000)]
temporarily disable the condition-case in the main startup function, some strange engine errors are caught and hard to debug with this, also add chess-opening and chess-ai to the default modules
Mario Lang [Mon, 26 Jan 2004 12:35:51 +0000 (12:35 +0000)]
(chess-pos-move): There was a bug in castling removal when a Rook moved, now compare chess-pos-can-castle and the source square of the moving piece to figure out if we need to remove castling priveledges
Mario Lang [Mon, 26 Jan 2004 09:31:00 +0000 (09:31 +0000)]
(chess-pos-legal-candidates): Remove the opponent pawn if we are capturing en passant. This fixes a bug where chess-legal-plies does not find an en passant if the pawn to be captured is giving check
John Wiegley [Sun, 25 Jan 2004 04:36:03 +0000 (04:36 +0000)]
Added an argument to chess-search-position, so that if we are
searching for the source of an algebraic move, and it is not a castle,
then do not check castle moves.
Mario Lang [Tue, 20 Jan 2004 20:43:21 +0000 (20:43 +0000)]
FEN notation actually specifies that field four (en passant) should denote the target square of the immenent capture, not the square of the piece about to be taken
Mario Lang [Mon, 19 Jan 2004 16:43:48 +0000 (16:43 +0000)]
rewrite this module such that it does not act as an engine, rather it invoked chess-sessions as needed. You need to use M-x chess-ics RET instead of C-u M-x chess RET ics RET now. Additionally, rewrite chess-ics-handle-ics12 such that it can handle the refresh command, and moves entered manually in the ICS buffer
Mario Lang [Tue, 13 Jan 2004 13:29:56 +0000 (13:29 +0000)]
Initial skeleton for Game Creating messages.
Support relation-type -2 (Examining game).
Handle the 'forward event.
(Now you can use the "examine" command on FICS, and simply
type '.' in the ChessBoard display to forward through the game.)
Mario Lang [Tue, 13 Jan 2004 09:47:28 +0000 (09:47 +0000)]
(chess-display-set-index): If INDEX is greater than chess-game-index,
and the last ply is not final, we emit a 'forward chess-module-game event
to give ics a chance to issue "forward\n". This makes
'.' work as expected in examined games.
Mario Lang [Mon, 12 Jan 2004 13:15:28 +0000 (13:15 +0000)]
(chess-ics-server-list): Added some more servers.
(chess-ics-regexp-alist): Make guest login on chessclub.com work.
(chess-ics-handle-ics12): Retrieve TimeControl info from
the ics12 board and set TimeControl game tag when initial board is seen.