Commit graph

3 commits

Author SHA1 Message Date
769886086c [board] Get king moves from the bitboard library 2024-01-02 08:42:47 -08:00
06bfc4ac57 [board] Implement a BitBoard MoveLibrary
This struct computes and stores piece moves per square to speed up computation
of move lists.

Initialize a `static mut` instance once via std::sync::Once, and return a static
reference to it. So far, it computes king and knight moves.

Make BitBoard::empty() and MoveLibrary::new() const functions, enabling static
construction of the MOVE_LIBRARY instance without needing to wrap it in an
Option.
2024-01-01 09:25:35 -08:00
1cc8b4520f [board] Return copies of rank and file bitboards from static lists 2023-12-31 09:26:20 -08:00