- Bitboard pick_random(RKISS& rk, int booster) {
-
- // Values s1 and s2 are used to rotate the candidate magic of a
- // quantity known to be optimal to quickly find the magics.
- int s1 = booster & 63, s2 = (booster >> 6) & 63;
-
- Bitboard m = rk.rand<Bitboard>();
- m = (m >> s1) | (m << (64 - s1));
- m &= rk.rand<Bitboard>();
- m = (m >> s2) | (m << (64 - s2));
- return m & rk.rand<Bitboard>();
- }
-
-