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::{
|
use crate::{
|
||||||
board::{Bitboard, Color, File, Square},
|
board::{Bitboard, Color, File, Square},
|
||||||
movegen::{
|
movegen::{
|
||||||
|
naive::{
|
||||||
king::king_moves,
|
king::king_moves,
|
||||||
knight::knight_moves,
|
knight::knight_moves,
|
||||||
pawn::{pawn_captures, pawn_moves},
|
pawn::{pawn_captures, pawn_moves},
|
||||||
|
},
|
||||||
wizardry::generation::{generate_bishop_magics, generate_rook_magics},
|
wizardry::generation::{generate_bishop_magics, generate_rook_magics},
|
||||||
Magic,
|
Magic,
|
||||||
},
|
},
|
||||||
|
|
|
@ -2,12 +2,8 @@
|
||||||
pub mod magic;
|
pub mod magic;
|
||||||
pub use magic::*;
|
pub use magic::*;
|
||||||
|
|
||||||
// Move generation implementation details
|
// Naive move generation
|
||||||
pub(crate) mod bishop;
|
pub mod naive;
|
||||||
pub(crate) mod king;
|
|
||||||
pub(crate) mod knight;
|
|
||||||
pub(crate) mod pawn;
|
|
||||||
pub(crate) mod rook;
|
|
||||||
|
|
||||||
// Magic bitboard generation
|
// Magic bitboard generation
|
||||||
pub(crate) mod wizardry;
|
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::board::{Bitboard, Square};
|
||||||
use crate::movegen::bishop::bishop_moves;
|
use crate::movegen::naive::{bishop::bishop_moves, rook::rook_moves};
|
||||||
use crate::movegen::rook::rook_moves;
|
|
||||||
use crate::movegen::Magic;
|
use crate::movegen::Magic;
|
||||||
|
|
||||||
use super::mask::{generate_bishop_mask, generate_rook_mask};
|
use super::mask::{generate_bishop_mask, generate_rook_mask};
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
use crate::board::{Bitboard, File, Rank, Square};
|
use crate::board::{Bitboard, File, Rank, Square};
|
||||||
use crate::movegen::bishop::bishop_moves;
|
use crate::movegen::naive::{bishop::bishop_moves, rook::rook_moves};
|
||||||
use crate::movegen::rook::rook_moves;
|
|
||||||
|
|
||||||
pub fn generate_bishop_mask(square: Square) -> Bitboard {
|
pub fn generate_bishop_mask(square: Square) -> Bitboard {
|
||||||
let rays = bishop_moves(square, Bitboard::EMPTY);
|
let rays = bishop_moves(square, Bitboard::EMPTY);
|
||||||
|
|
Loading…
Reference in a new issue