} // namespace
-PolyglotBook::PolyglotBook() {
-
- for (int i = Time::now() % 10000; i > 0; i--)
- RKiss.rand<unsigned>(); // Make random number generation less deterministic
-}
+PolyglotBook::PolyglotBook() : RKiss(Time::now() % 10000) {}
PolyglotBook::~PolyglotBook() { if (is_open()) close(); }
// Add 'special move' flags and verify it is legal
for (MoveList<LEGAL> ml(pos); !ml.end(); ++ml)
- if (move == (ml.move() & 0x3FFF))
+ if (move == (ml.move() ^ type_of(ml.move())))
return ml.move();
return MOVE_NONE;