Add magic bitboard generation
This commit is contained in:
parent
3f00c6d1fc
commit
a04b1f3a42
4 changed files with 69 additions and 4 deletions
|
|
@ -2,7 +2,6 @@ use crate::board::{Bitboard, File, Rank, Square};
|
|||
use crate::movegen::bishop::bishop_moves;
|
||||
use crate::movegen::rook::rook_moves;
|
||||
|
||||
#[allow(unused)] // FIXME: remove once used
|
||||
pub fn generate_bishop_mask(square: Square) -> Bitboard {
|
||||
let rays = bishop_moves(square, Bitboard::EMPTY);
|
||||
|
||||
|
|
@ -14,7 +13,6 @@ pub fn generate_bishop_mask(square: Square) -> Bitboard {
|
|||
rays - mask
|
||||
}
|
||||
|
||||
#[allow(unused)] // FIXME: remove once used
|
||||
pub fn generate_rook_mask(square: Square) -> Bitboard {
|
||||
let rays = rook_moves(square, Bitboard::EMPTY);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue