- for (Square s = SQ_A1; s <= SQ_H8; ++s)
- {
- SquareBB[s] = 1ULL << s;
- BSFTable[bsf_index(SquareBB[s])] = s;
- }
-
- for (Bitboard b = 1; b < 256; ++b)
- MS1BTable[b] = more_than_one(b) ? MS1BTable[b - 1] : lsb(b);
-
- for (File f = FILE_A; f <= FILE_H; ++f)
- FileBB[f] = f > FILE_A ? FileBB[f - 1] << 1 : FileABB;
-
- for (Rank r = RANK_1; r <= RANK_8; ++r)
- RankBB[r] = r > RANK_1 ? RankBB[r - 1] << 8 : Rank1BB;
-
- for (File f = FILE_A; f <= FILE_H; ++f)
- AdjacentFilesBB[f] = (f > FILE_A ? FileBB[f - 1] : 0) | (f < FILE_H ? FileBB[f + 1] : 0);