Commit graph

13 commits

Author SHA1 Message Date
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
b0b22048a8 [core] Rename (once again) chess_core → chessfriend_core 2024-01-24 08:48:19 -08:00
106800bcb3 [core,board] Update all use imports referring to Square, Rank, and File 2024-01-24 08:32:09 -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
5961b1bcd5 [board] Export BitBoard directly off of the crate for internal use
Update all the imports to import from the crate directly.
2024-01-14 10:57:22 -08:00
c79c05ddb6 Fix Pieces unit tests 2024-01-06 16:34:05 -08:00
750b16970f [board] Create const arrays for Shape that return &'static to its enum cases 2023-12-31 11:44:47 -08:00
c280258780 [board] Remove an unused local variable from pieces.rs 2023-12-29 16:34:26 -08:00
301fe1a4f4 [board] Remove a pile of debug printing from pieces.rs 2023-12-29 09:03:51 -08:00
50a6be2f72 [board] Pass piece argument to Position::bitboard_for_piece() by value instead of by reference 2023-12-27 08:31:02 -07:00
9d0761f8c6 [board] Rename from_algebraic_string → from_algebraic_str 2023-12-26 13:28:25 -07:00
758a3d95fc [board] Reorganize bitboard and position modules and export some symbols from the crate
Move position.rs to the position module and create a mod.rs.
Do the same for bitboard.rs in the bitboard modules.
Export Color, Piece, Position, and Square and use crate::Thing directly instead of referring to the symbol in the nested modules.
2023-12-26 11:25:27 -07:00
fac98735e3 [board] Implement a Pieces iterator
This type iterates the pieces in a Position using the BitScanner struct to iterate all the occupied squares of the position's bitboards.
2023-12-26 09:19:38 -07:00