From 1b250f224de20cb4689ae50bce942fe34754f701 Mon Sep 17 00:00:00 2001 From: dogeystamp Date: Fri, 25 Oct 2024 12:02:27 -0400 Subject: [PATCH] test: movegen tool --- src/bin/movegen_tool.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/bin/movegen_tool.rs diff --git a/src/bin/movegen_tool.rs b/src/bin/movegen_tool.rs new file mode 100644 index 0000000..56ad263 --- /dev/null +++ b/src/bin/movegen_tool.rs @@ -0,0 +1,16 @@ +//! Generates moves from the FEN in the argv. + +use chess_inator::Board; +use chess_inator::fen::FromFen; +use chess_inator::movegen::LegalMoveGen; +use std::env; + +fn main() { + for arg in env::args().skip(2) { + let board = Board::from_fen(&arg).unwrap(); + let mvs = board.gen_moves(); + for mv in mvs.into_iter() { + println!("{mv:?}") + } + } +}