be8024d176
Deny warnings in 'clippy' pre-commit hook
2024-04-01 22:20:39 +01:00
0b9318cdf3
Add 'Bitboard::has_more_than_one'
2024-04-01 22:20:39 +01:00
e673e20a63
Add 'Color::third_rank'
2024-04-01 22:20:39 +01:00
0cc1fcf912
Add 'CastleRights::with_{king,queen}_side'
2024-04-01 22:20:39 +01:00
072a1ea13c
Add '*Assign' operators to 'Bitboard'
2024-04-01 22:20:39 +01:00
02768b6d96
Remove all useless 'allow(unused)'
2024-04-01 22:20:39 +01:00
af421a9452
Tighten item visibilities
2024-04-01 22:20:39 +01:00
3b1735da79
Add 'BitboardIterator::new'
2024-04-01 22:20:39 +01:00
06087358de
Add bitboard-based move generation
2024-04-01 22:20:39 +01:00
459b878342
Expose magic bitboard generation to parent module
2024-04-01 22:20:39 +01:00
2bdfbbf467
Add 'MagicMoves'
2024-04-01 22:20:39 +01:00
d519cfb817
Make 'Magic' 'pub(crate)'
2024-04-01 22:20:39 +01:00
25494700d7
Add missing derives to 'Magic'
2024-04-01 22:20:39 +01:00
028c4543e7
Move 'Magic' to 'wizardry' submodule
2024-04-01 22:20:39 +01:00
868edda9d7
Move naive move generation into sub-module
2024-04-01 22:20:39 +01:00
23d01d4d3f
Make all modules at least 'pub(crate)'
2024-04-01 22:20:39 +01:00
bd9238d686
Add 'Color::iter'
2024-04-01 22:20:39 +01:00
066d442823
Add magic bitboard generation
2024-04-01 22:20:39 +01:00
5ef3737b98
Make 'Magic' fields 'pub(crate)'
2024-04-01 22:20:39 +01:00
1951db0720
Add magic mask generation
2024-04-01 22:20:39 +01:00
2601abdc76
Add 'Magic' type
2024-04-01 22:20:39 +01:00
d3a84750f5
Add naive pawn move generation
2024-04-01 22:20:39 +01:00
bf23d0eaae
Add naive rook move generation
2024-04-01 22:20:39 +01:00
8ff47231a0
Add naive bishop move generation
2024-04-01 22:20:39 +01:00
f0847a4e49
Add naive knight move generation
2024-04-01 22:20:39 +01:00
d91f63b5ed
Add naive king move generation
2024-04-01 22:20:39 +01:00
bed7ec3be2
Remove spurious links in 'Square' documentation
2024-04-01 22:20:39 +01:00
4491e5be00
Remove spurious links in 'Bitboard' documentation
2024-04-01 22:20:39 +01:00
8d03242e83
Add 'Bitboard::iter_powerset'
2024-04-01 22:20:39 +01:00
a3a9f64213
Add 'Piece' enum
2024-04-01 22:20:39 +01:00
d919b956ed
Add 'NUM_VARIANTS' constant to all 'board' enums
2024-04-01 22:20:39 +01:00
407f85c19b
Consistently use 'Self' type in 'impl' blocks
2024-04-01 22:20:39 +01:00
b68dd132e8
Fix typo in 'board::Color' documentation
2024-04-01 22:20:39 +01:00
2c1142324c
Add 'Color::slide_board_with_blockers'
2024-04-01 22:20:39 +01:00
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
f3a83065da
Add 'Color::{forward,backward}_direction'
2024-04-01 22:20:39 +01:00
0812d916ff
Add 'CastleRights::unmoved_rooks'
2024-04-01 22:20:39 +01:00
e84ec552fe
Add 'CastleRights::without_{king,queen}_side'
2024-04-01 22:20:39 +01:00
a21841c0ad
Add 'CastleRights::has_{king,queen}_side'
2024-04-01 22:20:39 +01:00
88e74d5fff
Add 'CastleRights' enum
2024-04-01 22:20:39 +01:00
f351f056a9
Add 'Color' enum
2024-04-01 22:20:39 +01:00
042f5dbc4d
Rename 'board::direction{s,}'
2024-04-01 22:20:39 +01:00
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
d51d72377e
Add 'static_assert' macro
2024-04-01 22:20:39 +01:00
643b688384
Add 'Bitboard::{LIGHT,DARK}_SQUARES
2024-04-01 22:20:39 +01:00
659e3f1c9a
Make use of 'Bitboard::is_empty'
2024-04-01 22:20:39 +01:00
f66b0276d8
Add 'Bitboard::is_empty'
2024-04-01 22:20:39 +01:00
9ef600c1bb
Add 'Direction::slide_{square,board}'
2024-04-01 22:20:39 +01:00
dc974ec0e9
Add 'Bitboard::{ANTI_,}DIAGONAL'
2024-04-01 22:20:39 +01:00
251c10cbc7
Add 'Direction::move_square'
2024-04-01 22:20:39 +01:00