[moves] Implement AllPiecesMoveGenerator
A generator that yields moves for all pieces on the board. This generator combines the shape-specific move generators developed in prior commits into a single iterator that yields all moves. Implement FusedIterator for all generators so AllPiecesMoveGenerator can avoid doing a bunch of extra work once each iterator has yielded None.
This commit is contained in:
parent
19c6c6701a
commit
2106e05d57
6 changed files with 85 additions and 3 deletions
|
|
@ -1,5 +1,6 @@
|
|||
// Eryn Wells <eryn@erynwells.me>
|
||||
|
||||
mod all;
|
||||
mod king;
|
||||
mod knight;
|
||||
mod pawn;
|
||||
|
|
@ -8,6 +9,7 @@ mod slider;
|
|||
#[cfg(test)]
|
||||
mod testing;
|
||||
|
||||
pub use all::AllPiecesMoveGenerator;
|
||||
pub use king::KingMoveGenerator;
|
||||
pub use knight::KnightMoveGenerator;
|
||||
pub use pawn::PawnMoveGenerator;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue