No description
Find a file
Eryn Wells 1c94f157e6 [board] First pass at computing checks
Calculate checks using a method described on a blog post I read.[1] This requires
knowing some details about the move that was just made: the origin and target
squares. The piece moved is also passed to the method, though it could look it up.

First look for a direct check, where the piece that just moved is now attacking
the king.

Second, look for revealed checks, where the moved piece reveals a ray from a
sliding piece that attacks the king.

This check information is collected into a CheckingPieces struct that describes
for the newly active player how they can get out of check. The push mask is a
BitBoard of the set of squares the player can move to in order to block the check.
The capture mask is the set of pieces that must be captured to resolve the check.
And the king moves BitBoard shows the squares the king can move to, accounting for
the opposing player's sight.

[1]: https://peterellisjones.com/posts/generating-legal-chess-moves-efficiently/
2025-07-12 20:26:41 -07:00
bitboard [bitboard] Add a doc comment to BitBoard::first_occupied_square 2025-07-12 20:20:04 -07:00
board [board] First pass at computing checks 2025-07-12 20:26:41 -07:00
chessfriend [chessfriend] Empty crate 2025-06-16 19:29:57 -07:00
core [core] Fix an incorrect assertion in the Score doc test 2025-07-12 17:12:34 -07:00
doc
explorer [board, explorer, position] Clean up naming of sight and movement methods 2025-06-29 09:23:20 -07:00
moves [board, moves] Derive Clone on several error types 2025-06-21 21:08:04 -07:00
perft [explorer, perft, position] Move node count into a new PerftCounters struct 2025-06-19 11:34:59 -07:00
position [board, position] Simplify check methods 2025-06-29 09:25:08 -07:00
.gitignore
Cargo.lock Remove empty dependencies list from Cargo.lock 2025-06-17 16:42:17 -07:00
Cargo.toml Add a release-debug profile 2025-06-19 14:27:52 -07:00
ChessFriend.code-workspace Visual Studio Code workspace 2024-02-11 10:22:33 -07:00
Makefile WIP 2025-05-08 17:37:59 -07:00
rustfmt.toml Add style_edition to rustfmt.toml 2025-06-17 16:24:46 -07:00