Commit graph

61 commits

Author SHA1 Message Date
b5d4069751 Make moves::castle::Parameters public
Rename this struct CastlingParameters → Parameters
Implement getter methods for private properties
2024-02-25 08:51:23 -08:00
b3e55f6dcd Split out some unchecked and check move build() methods
Unchecked are unsafe. Checked are safe.
2024-02-13 11:07:49 -07:00
047eb4fd77 Get en passant move building working (again?) 2024-02-13 11:05:02 -07:00
5d1ad73be6 In Move::capture_square, move the en passant check above the simple capture check 2024-02-13 11:04:21 -07:00
e172bfb5dd Remove the Copy trait from most move Styles and add Clone, Debug, Eq, and PartialEq to Promotion and Castle 2024-02-13 11:03:28 -07:00
3b8b6b36e3 Implement a basic Display for chessfriend_moves::Move 2024-02-11 10:23:07 -07:00
8724c3cdce Pad out the discriminants of Kind variants 2024-02-11 10:23:07 -07:00
e6a9b7f8c4 Return a chessfriend_moves::EnPassant from a new Position::en_passant()
Replace Position's en_passant_target_square() and en_passant_capture_square()
with a single en_passant() method that returns a new EnPassant struct that has
the target and capture squares for the en passant move.
2024-02-11 10:23:07 -07:00
c55b7c4877 Implement a whole new move crate 2024-02-11 10:23:07 -07:00
0bedf2aa9f Implement part of a new Builder using the type state pattern
The API for this is much easier to use.
2024-02-11 10:23:07 -07:00
f69c7d4c96 Move a bunch of stuff from the position::move module over to a new chessfriend_moves crate 2024-02-11 10:23:07 -07:00