basic uci protocol
This commit is contained in:
parent
9d527634eb
commit
66cea5a2bf
16 changed files with 94 additions and 942 deletions
|
|
@ -1,6 +1,6 @@
|
|||
use chess_engine::board::Board;
|
||||
use chess_engine::movegen::generate_pseudo_legal_moves;
|
||||
use chess_engine::movegen::legal_check::is_king_attacked;
|
||||
use chess_engine::movegen::legal_check::is_other_king_attacked;
|
||||
use chess_engine::r#move::MoveList;
|
||||
|
||||
fn count_legal_moves_recursive(board: &mut Board, depth: u8) -> u64 {
|
||||
|
|
@ -16,7 +16,7 @@ fn count_legal_moves_recursive(board: &mut Board, depth: u8) -> u64 {
|
|||
// Store the undo info when making the move
|
||||
let undo_info = board.make_move(*mv);
|
||||
|
||||
if !is_king_attacked(board) {
|
||||
if !is_other_king_attacked(board) {
|
||||
leaf_nodes += count_legal_moves_recursive(board, depth - 1);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue