220da08727
Directly rename board -> position
2024-01-28 09:56:57 -08:00
1e77bc5ebb
[board] Test to verify the king can't move into or stay in check
...
Write a test on the king move generator to verify the king can't move to a
square where it would still be in check.
2024-01-28 09:45:13 -08:00
bea6dd67c8
[board] Remove the position reference from move generator structs
...
Simplifies the lifetime calculations, and makes it possible to cache a Moves
object on Position.
2024-01-27 13:02:43 -08:00
8b2a3926b3
[core,board] Move board::piece to core
...
Break up types in core into finer grained modules.
Update all the imports.
2024-01-24 17:08:27 -08:00
6f85305912
[board] Clean up a bunch of build errors
...
Fix imports to refer to core and bitboard crates.
Fix some API use errors.
2024-01-24 09:18:12 -08:00
1a907844d6
[board] Update a bunch of methods to take &Piece instead of plain Piece
2024-01-21 09:18:16 -08:00
918b68f300
[board] Use Castle as the interface type for methods related to castling
...
Use BoardSide as an internal type for looking up generated bitboards, target squares, etc.
2024-01-21 09:05:42 -08:00
24cce95a88
[board] Implement a PositionBuilder; refactor piece bitboards into a PieceBitBoards struct
...
This makes Position immutable, even if declared mut. I think this will also make
it easier to build positions going forward.
Moving to a PieceBitBoards struct also required a lot of places that return owned
BitBoards to return refs. This is basically fine except for adding a few more &
here and there.
This was a huge refactoring project. All the move generators and a bunch of
BitBoard stuff needed to be updated.
2024-01-19 18:09:05 -08:00
2174bcf009
[board] Update all the move generator submodules to use MoveBuilder instead of Move
...
Along the way update "manual" piece creation to use the macros instead.
2024-01-17 08:43:48 -08:00
ca9ff94d2a
[board] Rename the moves modules → move_generator
...
Update the imports.
Also update some references to crate symbols in move_generator macros to use $crate.
2024-01-17 08:40:09 -08:00