aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/board.rs1
-rw-r--r--src/main.rs1
-rw-r--r--src/moves.rs21
3 files changed, 23 insertions, 0 deletions
diff --git a/src/board.rs b/src/board.rs
index 86c42c7..241412e 100644
--- a/src/board.rs
+++ b/src/board.rs
@@ -115,6 +115,7 @@ pub enum Color {
/// Aliases to board square indexes
#[allow(dead_code)]
+#[derive(Debug)]
pub enum Square {
A1, B1, C1, D1, E1, F1, G1, H1,
A2, B2, C2, D2, E2, F2, G2, H2,
diff --git a/src/main.rs b/src/main.rs
index dc04d4b..3ffab60 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,6 +1,7 @@
mod bitboard;
mod board;
mod attacks;
+mod moves;
fn main() {
println!("Hello, world!");
diff --git a/src/moves.rs b/src/moves.rs
new file mode 100644
index 0000000..0dd5353
--- /dev/null
+++ b/src/moves.rs
@@ -0,0 +1,21 @@
+use crate::board::Square;
+
+#[derive(Debug)]
+pub struct Move {
+ from: Square,
+ to: Square,
+}
+
+// TODO: think about the size
+type MoveList = [Move; 1024];
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+
+ #[test]
+ fn mock() {
+ let mov = Move { from: Square::E2, to: Square::E4 };
+ println!("{:?}", mov);
+ }
+}