[board] Add a MoveGenerator struct
This commit is contained in:
parent
51a265172b
commit
dda4cd8a5a
3 changed files with 20 additions and 0 deletions
|
@ -1,7 +1,9 @@
|
|||
mod bitboard;
|
||||
mod moves;
|
||||
pub mod piece;
|
||||
mod position;
|
||||
mod square;
|
||||
|
||||
pub use moves::Move;
|
||||
pub use position::Position;
|
||||
pub use square::Square;
|
||||
|
|
5
board/src/moves/mod.rs
Normal file
5
board/src/moves/mod.rs
Normal file
|
@ -0,0 +1,5 @@
|
|||
// Eryn Wells <eryn@erynwells.me>
|
||||
|
||||
mod move_generator;
|
||||
|
||||
pub use move_generator::MoveGenerator;
|
13
board/src/moves/move_generator.rs
Normal file
13
board/src/moves/move_generator.rs
Normal file
|
@ -0,0 +1,13 @@
|
|||
// Eryn Wells <eryn@erynwells.me>
|
||||
|
||||
use crate::Position;
|
||||
|
||||
pub struct MoveGenerator<'a> {
|
||||
pub(super) position: &'a Position,
|
||||
}
|
||||
|
||||
impl<'a> MoveGenerator<'a> {
|
||||
pub fn new(position: &Position) -> MoveGenerator {
|
||||
MoveGenerator { position }
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue