Commit graph

16 commits

Author SHA1 Message Date
Bruno BELANYI d74605ba5c Use 'NUM_VARIANTS' where appropriate 2024-04-03 21:26:18 +01:00
Bruno BELANYI 6976c60fe6 Add 'TryInto<Square>' for 'Bitboard' 2024-04-01 22:20:39 +01:00
Bruno BELANYI 0b9318cdf3 Add 'Bitboard::has_more_than_one' 2024-04-01 22:20:39 +01:00
Bruno BELANYI 072a1ea13c Add '*Assign' operators to 'Bitboard' 2024-04-01 22:20:39 +01:00
Bruno BELANYI 3b1735da79 Add 'BitboardIterator::new' 2024-04-01 22:20:39 +01:00
Bruno BELANYI 4491e5be00 Remove spurious links in 'Bitboard' documentation 2024-04-01 22:20:39 +01:00
Bruno BELANYI 8d03242e83 Add 'Bitboard::iter_powerset' 2024-04-01 22:20:39 +01:00
Bruno BELANYI 0315e2fb51 Improve 'board::BitboardIterator'
* Accurate 'size_hint'.
* Exact size.
* Fused iterator (keeps returning 'None' after returning 'None' once).
2024-04-01 22:20:39 +01:00
Bruno BELANYI 585c127381 Statically assert zero-cost invariants
Since some or all of those invariants will come in handy to ensure we
use as little memory as possible, to maximize the speed of the move
generation later on.
2024-04-01 22:20:39 +01:00
Bruno BELANYI 643b688384 Add 'Bitboard::{LIGHT,DARK}_SQUARES 2024-04-01 22:20:39 +01:00
Bruno BELANYI f66b0276d8 Add 'Bitboard::is_empty' 2024-04-01 22:20:39 +01:00
Bruno BELANYI dc974ec0e9 Add 'Bitboard::{ANTI_,}DIAGONAL' 2024-04-01 22:20:39 +01:00
Bruno BELANYI 8261b0c06b Add 'Bitboard::count' 2024-04-01 22:20:39 +01:00
Bruno BELANYI 47b1854669 Introduce 'Bitboard::ALL' 2024-04-01 22:20:39 +01:00
Bruno BELANYI a0fcf3285c Add bitboard iteration
Introduce 'BitboardIterator', use it to implement 'IntoIterator' for
'Bitboard'.
2024-04-01 22:20:39 +01:00
Bruno BELANYI f4a92c0681 Move 'board::bitboard' into folder module
I will be adding a 'BitboardIterator' type, and it makes more sense to
use a folder for this module at this point.
2024-04-01 22:20:39 +01:00