Move naive move generation into sub-module
This commit is contained in:
parent
8289204e4b
commit
bd43535192
|
@ -7,9 +7,11 @@ pub mod utils;
|
|||
use crate::{
|
||||
board::{Bitboard, Color, File, Square},
|
||||
movegen::{
|
||||
king::king_moves,
|
||||
knight::knight_moves,
|
||||
pawn::{pawn_captures, pawn_moves},
|
||||
naive::{
|
||||
king::king_moves,
|
||||
knight::knight_moves,
|
||||
pawn::{pawn_captures, pawn_moves},
|
||||
},
|
||||
wizardry::generation::{generate_bishop_magics, generate_rook_magics},
|
||||
Magic,
|
||||
},
|
||||
|
|
|
@ -2,12 +2,8 @@
|
|||
pub mod magic;
|
||||
pub use magic::*;
|
||||
|
||||
// Move generation implementation details
|
||||
pub(crate) mod bishop;
|
||||
pub(crate) mod king;
|
||||
pub(crate) mod knight;
|
||||
pub(crate) mod pawn;
|
||||
pub(crate) mod rook;
|
||||
// Naive move generation
|
||||
pub mod naive;
|
||||
|
||||
// Magic bitboard generation
|
||||
pub(crate) mod wizardry;
|
||||
|
|
5
src/movegen/naive/mod.rs
Normal file
5
src/movegen/naive/mod.rs
Normal file
|
@ -0,0 +1,5 @@
|
|||
pub mod bishop;
|
||||
pub mod king;
|
||||
pub mod knight;
|
||||
pub mod pawn;
|
||||
pub mod rook;
|
|
@ -1,6 +1,5 @@
|
|||
use crate::board::{Bitboard, Square};
|
||||
use crate::movegen::bishop::bishop_moves;
|
||||
use crate::movegen::rook::rook_moves;
|
||||
use crate::movegen::naive::{bishop::bishop_moves, rook::rook_moves};
|
||||
use crate::movegen::Magic;
|
||||
|
||||
use super::mask::{generate_bishop_mask, generate_rook_mask};
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
use crate::board::{Bitboard, File, Rank, Square};
|
||||
use crate::movegen::bishop::bishop_moves;
|
||||
use crate::movegen::rook::rook_moves;
|
||||
use crate::movegen::naive::{bishop::bishop_moves, rook::rook_moves};
|
||||
|
||||
pub fn generate_bishop_mask(square: Square) -> Bitboard {
|
||||
let rays = bishop_moves(square, Bitboard::EMPTY);
|
||||
|
|
Loading…
Reference in a new issue