summaryrefslogtreecommitdiff
path: root/chess-pos.el
AgeCommit message (Collapse)Author
2014-04-18chess-pos-move: Really remove castling ability if rook has been moved.Mario Lang
This one was *very subtle. Looking at the code, we already tried to prevent this case, and it evenw orked for *some* instances. The problem is that castling flags are boolean in the position structure, chess-pos-can-castle determines the rook location from the position if castling flag is true. But we have already moved the rook around in chess-pos-move before we do the fixup stuff, so chess-pos-can-castle is just wrong in some cases. Fix is simple, call chess-pos-can-castle before we modify the position, and use these values later. This fixes the remaining perft mixmatches.
2014-04-07chess-search-position: Also consider opponent king moves when checking for ↵Mario Lang
check. With this the rule that there always needs to be one square between kings is honours in chess-legal-plies. Without this fix, a move next to the opponents king was considered legal.
2014-04-01chess-rf-to-index: Fix assertion.Mario Lang
Should be and, not or. cl-check-type is more clear anyway.
2014-03-31chess-pos.el: Reorder some definitions to pacify compiler.Mario Lang
Also, actually disable assertions during compilation (as intended) which increases performance by roughly 30%.
2014-03-30Fix a rather serious bug in chess-pos-move:Mario Lang
We were checking for king or rook moves to remove our castling flags if necessary, but we did not remove the opponents castling flags if we took one of their rooks. This led to rather invalid positions. You could castle with your king and the opponents piece.
2014-03-24chess-pos-can-castle: Avoid error if there is no king on the board.Mario Lang
2009-12-27char-valid-p is obsolete (as of Emacs 23.1); use characterp insteadMario Lang
2008-09-01When byte-compiling chess-pos, set cl-optimize-speed to 9. This increasesJohn Wiegley
the computation of chess-eco.fen by up to 50% on my system.
2004-02-18(chess-pos-passed-pawns): New function.Mario Lang
2004-01-28(chess-search-position): document arguments check-only and no-castling.Mario Lang
2004-01-26(chess-pos-move): There was a bug in castling removal when a Rook moved, now ↵Mario Lang
compare chess-pos-can-castle and the source square of the moving piece to figure out if we need to remove castling priveledges
2004-01-26(chess-pos-legal-candidates): Remove the opponent pawn if we are capturing ↵Mario Lang
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
2004-01-25Added an argument to chess-search-position, so that if we areJohn Wiegley
searching for the source of an algebraic move, and it is not a castle, then do not check castle moves.
2004-01-07remov chess-pos-read-epd-fileMario Lang
2004-01-03New function chess-pos-read-epd-file, which parses an epd file into a list ↵Mario Lang
of positions
2002-05-01*** no comment ***John Wiegley
2002-05-01added a small commentJohn Wiegley
2002-04-28*** no comment ***John Wiegley
2002-04-26*** no comment ***John Wiegley
2002-04-26bug fixesJohn Wiegley
2002-04-25fixJohn Wiegley
2002-04-24*** no comment ***John Wiegley
2002-04-24*** no comment ***John Wiegley
2002-04-24added support for setting EPD codesJohn Wiegley
2002-04-22Bug fixes and reducing the TODO list.John Wiegley
2002-04-19Fixes and other work.John Wiegley
2002-04-18whitespace fixJohn Wiegley
2002-04-18Many efficiency improvements and bug fixes.John Wiegley
2002-04-17More general bug fixing, efficiency improvements, etc.John Wiegley
2002-04-17*** no comment ***John Wiegley
2002-04-17*** no comment ***John Wiegley
2002-04-17*** no comment ***John Wiegley
2002-04-16More efficiency improvements.John Wiegley
2002-04-16Fixed pos status not being updated.John Wiegley
2002-04-16Report checkmate in the modeline correctly.John Wiegley
2002-04-16Removed the $ Revision strings; they are no longer necessary since IJohn Wiegley
tag every revision that I upload.
2002-04-16Major speed improvement and efficiency work. chess-legal-plies isJohn Wiegley
much more memory conservative now. Reduced recursion in chess-search-position by a slight bit.
2002-04-13added message catalog supportJohn Wiegley
2002-04-12*** no comment ***John Wiegley
2002-04-12optimizations and bug fixesJohn Wiegley
2002-04-11*** no comment ***John Wiegley
2002-04-11*** no comment ***John Wiegley
2002-04-10*** no comment ***John Wiegley
2002-04-10*** no comment ***John Wiegley
2002-04-10Support smart killing/yankingJohn Wiegley
2002-04-08*** no comment ***John Wiegley
2002-04-08*** no comment ***John Wiegley
2002-04-08Added support for playing out puzzle collections.John Wiegley
2002-04-08*** no comment ***John Wiegley
2002-04-08added support for pawn promotion and en-passant capturesJohn Wiegley