implemented make_move for basic white moves

This commit is contained in:
Moritz 2025-11-13 01:06:33 +01:00
parent ca75fa6d61
commit b72e1e55eb
2 changed files with 101 additions and 25 deletions

View file

@ -4,10 +4,17 @@ use chess_engine::r#move::*;
fn main() {
let board = Board::from_fen("rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR b KQkq - 1 2");
let mut board = Board::from_fen("rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1");
let mut move_list = MoveList::new();
generate_pseudo_legal_moves(&board, &mut move_list);
println!("Counted {} pseudo legal moves.", move_list.len());
for mv in move_list.iter() {
board.pretty_print_ascii();
println!("--> making move: {}", mv.to_algebraic());
let mut board_clone = board.clone();
board_clone.make_move(*mv);
board_clone.pretty_print_ascii();
println!("---------------------");
}
}