Commit graph

2 commits

Author SHA1 Message Date
4a5ae8ec59 [board] Move position builders into a builders module
Move PositionBuilder to position_builder.rs and export it from the builders module.
2024-01-21 09:20:03 -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