From dda4cd8a5a48329945ceaad6b0d499bcc0a1bd1c Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Wed, 27 Dec 2023 10:02:23 -0700 Subject: [PATCH] [board] Add a MoveGenerator struct --- board/src/lib.rs | 2 ++ board/src/moves/mod.rs | 5 +++++ board/src/moves/move_generator.rs | 13 +++++++++++++ 3 files changed, 20 insertions(+) create mode 100644 board/src/moves/mod.rs create mode 100644 board/src/moves/move_generator.rs diff --git a/board/src/lib.rs b/board/src/lib.rs index 4186ed7..95f0e0d 100644 --- a/board/src/lib.rs +++ b/board/src/lib.rs @@ -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; diff --git a/board/src/moves/mod.rs b/board/src/moves/mod.rs new file mode 100644 index 0000000..a3fe9ae --- /dev/null +++ b/board/src/moves/mod.rs @@ -0,0 +1,5 @@ +// Eryn Wells + +mod move_generator; + +pub use move_generator::MoveGenerator; diff --git a/board/src/moves/move_generator.rs b/board/src/moves/move_generator.rs new file mode 100644 index 0000000..ebb6d1a --- /dev/null +++ b/board/src/moves/move_generator.rs @@ -0,0 +1,13 @@ +// Eryn Wells + +use crate::Position; + +pub struct MoveGenerator<'a> { + pub(super) position: &'a Position, +} + +impl<'a> MoveGenerator<'a> { + pub fn new(position: &Position) -> MoveGenerator { + MoveGenerator { position } + } +}