Commit graph

10 commits

Author SHA1 Message Date
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
d2d33a4915 [board] Add Position::color_to_move defaulting to White 2023-12-26 11:22:40 -07:00
1575c83d31 [board] Rename PiecePlacementError::PieceExistsOnSquare → ExistsOnSquare 2023-12-26 11:20:01 -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
18d9a845e6 [board] Implement a custom Debug for Position
Newlines help a lot!
2023-12-26 09:17:57 -07:00
e23c20486e [board] Build error and warning fixes
- Remove unused import from bit_scanner.rs
- Rename PieceShape → Shape in the Position tests
2023-12-26 09:16:55 -07:00
a2f88f0fde [board] Give piece Color and shape enums integer values
Rename PieceShape → Shape
Remove color and piece modules from position.rs
2023-12-23 20:20:19 -07:00
366f15ca12 [board] Implement placing a piece in a mutable position 2023-12-23 09:31:47 -07:00
6af64171a2 [board] Implement BitAnd and BitOr on BitBoard and make it's u64 private 2023-12-22 08:50:03 -08:00
d776bd18e2 [board] Move bitboard lib to "board" 2023-12-20 11:45:55 -08:00
Renamed from bitboard/src/position.rs (Browse further)