[board] Return copies of rank and file bitboards from static lists
This commit is contained in:
parent
e30bcb3105
commit
1cc8b4520f
3 changed files with 31 additions and 4 deletions
25
board/src/bitboard/library.rs
Normal file
25
board/src/bitboard/library.rs
Normal file
|
@ -0,0 +1,25 @@
|
|||
// Eryn Wells <eryn@erynwells.me>
|
||||
|
||||
use super::BitBoard;
|
||||
|
||||
pub(super) const RANKS: [BitBoard; 8] = [
|
||||
BitBoard(0xFF << 0 * 8),
|
||||
BitBoard(0xFF << 1 * 8),
|
||||
BitBoard(0xFF << 2 * 8),
|
||||
BitBoard(0xFF << 3 * 8),
|
||||
BitBoard(0xFF << 4 * 8),
|
||||
BitBoard(0xFF << 5 * 8),
|
||||
BitBoard(0xFF << 6 * 8),
|
||||
BitBoard(0xFF << 7 * 8),
|
||||
];
|
||||
|
||||
pub(super) const FILES: [BitBoard; 8] = [
|
||||
BitBoard(0x0101010101010101 << 0),
|
||||
BitBoard(0x0101010101010101 << 1),
|
||||
BitBoard(0x0101010101010101 << 2),
|
||||
BitBoard(0x0101010101010101 << 3),
|
||||
BitBoard(0x0101010101010101 << 4),
|
||||
BitBoard(0x0101010101010101 << 5),
|
||||
BitBoard(0x0101010101010101 << 6),
|
||||
BitBoard(0x0101010101010101 << 7),
|
||||
];
|
Loading…
Add table
Add a link
Reference in a new issue