test: movegen tool

This commit is contained in:
dogeystamp 2024-10-25 12:02:27 -04:00
parent 611cdd4d51
commit 1b250f224d

16
src/bin/movegen_tool.rs Normal file
View File

@ -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:?}")
}
}
}