Spaces:
Runtime error
Runtime error
| pub type Bitboard = u64; | |
| pub const EMPTY: Bitboard = 0; | |
| pub const FILE_A: Bitboard = 0x0101010101010101; | |
| pub const FILE_H: Bitboard = 0x8080808080808080; | |
| pub fn pop_lsb(bb: &mut Bitboard) -> u8 { | |
| let lsb = bb.trailing_zeros() as u8; | |
| *bb &= *bb - 1; | |
| lsb | |
| } | |
| pub fn get_bit(bb: Bitboard, sq: crate::types::Square) -> bool { | |
| (bb & (1 << (sq as u8))) != 0 | |
| } | |