CWEVCXXC3D5NLLIFIYEWTXHPLX4EU5XH3YUUTMV7GYBLSQXT5VPQC
NYVHTMLLUMBKBQSWO6SQDQ5KFACQLNCBRDDM5BH3OU6WWT54KC2AC
TB4YBE4CMWCLSKJ43QF6IU5HVYUUO33BLXVG7XDRLJS3IFIBQLYAC
WTTQGET65BQV7NSFOI75JGCTWFS6R73OFZE4V63JYWAODNIOUAHQC
BL3ZR4OWJM54HFXUNMUZKB5YQYVBT7ETFIXCOXWL6S5SZFM6IFDQC
VFH3EJPYSVGK6HYH4B3SVYG7LPBSHEPRRGRH2QRAC4KYWAV3SSIQC
IBUD4SUGA4IS6HUQIHVJJOFS4CMTWJMTMXS4LWGFVK4PFUFKE5LAC
TDHJSFFSJZBEZFMDHPLRSVB6CIVJ7AWGGNIC3WUCADQLQSIQKXDAC
JPK7SJDQWLCNDXJQEQQHXBN4Y677BPQ5QBL55GRZ55RSP4GK4L4AC
7T5U3ARTEEAORKCSJY763X5TJRGHCEQK3OW323YO5CZIM77EH77AC
GDHXEMN5IXJDS63G3DUZH5PR2XH2SSXISABF2JHCYA3JSRXDPLMQC
2CU67A3QXXPH722WBAL74O6P2N2RRXFBQVPT3A5QAXTUCQ3UUU5AC
6S6HHKOXBQ5ARL7S7PKMPDIAH3VTPOAPWWSMGY37RP2R2U662FBAC
FOORIA7SEZCLKDBNMV6KEDTQOJJVAH57BQFBRSQMET6FERJPHCVQC
3H3DSWLBWCE7C43W6LHICCPJ5KQDLASLQPIKJOK2KAE6OFF2L6WAC
XHCMZF25YBLNQLVKKBJJWWJ3G24VFUSLE3LAT2DRWL52RJX4Z3EAC
OF6NBX4Y6UWXBSSENWBBYH3AU4TI5FCD5S7WKYMINBUBCKA2MD4AC
mut_occupancy &= bishop_masks[square.int()];
mut_occupancy = @mulWithOverflow(mut_occupancy, bishop_magic[square.int()])[0];
mut_occupancy &= bishop_masks[square];
mut_occupancy = @mulWithOverflow(mut_occupancy, bishop_magic[square])[0];
'P' => self.bitboards[Chess.PE.P.int()].set(square),
'N' => self.bitboards[Chess.PE.N.int()].set(square),
'B' => self.bitboards[Chess.PE.B.int()].set(square),
'R' => self.bitboards[Chess.PE.R.int()].set(square),
'Q' => self.bitboards[Chess.PE.Q.int()].set(square),
'K' => self.bitboards[Chess.PE.K.int()].set(square),
'P' => self.bitboards[@enumToInt(Chess.PE.P)].set(square),
'N' => self.bitboards[@enumToInt(Chess.PE.N)].set(square),
'B' => self.bitboards[@enumToInt(Chess.PE.B)].set(square),
'R' => self.bitboards[@enumToInt(Chess.PE.R)].set(square),
'Q' => self.bitboards[@enumToInt(Chess.PE.Q)].set(square),
'K' => self.bitboards[@enumToInt(Chess.PE.K)].set(square),
'p' => self.bitboards[Chess.PE.p.int()].set(square),
'n' => self.bitboards[Chess.PE.n.int()].set(square),
'b' => self.bitboards[Chess.PE.b.int()].set(square),
'r' => self.bitboards[Chess.PE.r.int()].set(square),
'q' => self.bitboards[Chess.PE.q.int()].set(square),
'k' => self.bitboards[Chess.PE.k.int()].set(square),
'p' => self.bitboards[@enumToInt(Chess.PE.p)].set(square),
'n' => self.bitboards[@enumToInt(Chess.PE.n)].set(square),
'b' => self.bitboards[@enumToInt(Chess.PE.b)].set(square),
'r' => self.bitboards[@enumToInt(Chess.PE.r)].set(square),
'q' => self.bitboards[@enumToInt(Chess.PE.q)].set(square),
'k' => self.bitboards[@enumToInt(Chess.PE.k)].set(square),
const pa = self.attacks.pawn_attacks[@enumToInt(Chess.Colors.black)][square.int()];
if (pa & @bitCast(BoardType, self.bitboards[Chess.PE.P.int()]) != 0) return true;
const pa = self.attacks.pawn_attacks[@enumToInt(Chess.Colors.black)][square];
if (pa & @bitCast(BoardType, self.bitboards[@enumToInt(Chess.PE.P)]) != 0) return true;
const pa = self.attacks.pawn_attacks[@enumToInt(Chess.Colors.white)][square.int()];
if (pa & @bitCast(BoardType, self.bitboards[Chess.PE.p.int()]) != 0) return true;
const pa = self.attacks.pawn_attacks[@enumToInt(Chess.Colors.white)][square];
if (pa & @bitCast(BoardType, self.bitboards[@enumToInt(Chess.PE.p)]) != 0) return true;
.B, .b => self.attacks.getBishopAttacks(
@intToEnum(Square, source_square),
self.occupBoth(),
).*,
.R, .r => self.attacks.getRookAttacks(
@intToEnum(Square, source_square),
self.occupBoth(),
).*,
.Q, .q => self.attacks.getQueenAttacks(
@intToEnum(Square, source_square),
self.occupBoth(),
),
.B, .b => self.attacks.getBishopAttacks(source_square, self.occupBoth()).*,
.R, .r => self.attacks.getRookAttacks(source_square, self.occupBoth()).*,
.Q, .q => self.attacks.getQueenAttacks(source_square, self.occupBoth()),