No description
Find a file
Eryn Wells 3951af76cb [core, moves, position] Implement parsing long algebraic moves
UCI uses a move format it calls "long algebraic". They look like either "e2e4"
for a regular move, or "h7h8q" for a promotion. Implement parsing these move
strings as a two step process. First define an AlgebraicMoveComponents struct
in the moves crate that implements FromStr. This struct reads out an origin
square, a target square, and an optional promotion shape from a string. Then,
implement a pair of methods on Position that take the move components struct
and return a fully encoded Move struct with them.

This process is required because the algebraic string is not enough by itself to
know what kind of move was made. The current position is required to understand
that.

Implement Shape::is_promotable().

Add a NULL move to the Move struct. I'm not sure what this is used for yet, but
the UCI spec specifically calls out a string that encodes a null move, so I added
it. It may end up being unused!

Do a little bit of cleanup in the core crate as well. Use deeper imports (import
std::fmt instead of requring the fully qualified type path) and remove some
unnecessary From implementations.

This commit is also the first instance (I think) of defining an errors module
in lib.rs for the core crate that holds the various error types the crate exports.
2025-06-16 08:57:48 -07:00
bitboard [bitboard] Fix the warning about shared references to mutable static data 2025-06-08 17:34:42 -07:00
board [explorer] Print some question marks if a move is generated without target/origin squares 2025-06-11 08:15:06 -07:00
core [core, moves, position] Implement parsing long algebraic moves 2025-06-16 08:57:48 -07:00
doc Move Notes and ChessPieces docs to a doc directory 2024-01-22 19:27:08 -08:00
explorer [explorer] Print some question marks if a move is generated without target/origin squares 2025-06-11 08:15:06 -07:00
moves [core, moves, position] Implement parsing long algebraic moves 2025-06-16 08:57:48 -07:00
perft [perft] Print the depth of the position being checked in check-positions 2025-06-15 16:24:19 -07:00
position [core, moves, position] Implement parsing long algebraic moves 2025-06-16 08:57:48 -07:00
.gitignore Ignore the target/ directory 2023-12-19 11:13:41 -08:00
Cargo.lock [perft] A small Perft program 2025-06-08 17:19:00 -07:00
Cargo.toml [perft] A small Perft program 2025-06-08 17:19:00 -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 a rustfmt.toml file 2025-06-07 08:48:45 -07:00