- limits.time = time[pos.side_to_move()];
- limits.increment = inc[pos.side_to_move()];
-
- Threads.start_searching(pos, limits, searchMoves);
- }
-
-
- // perft() is called when engine receives the "perft" command. The function
- // calls perft() with the required search depth then prints counted leaf nodes
- // and elapsed time.
-
- void perft(Position& pos, istringstream& is) {
-
- int depth;
-
- if (!(is >> depth))
- return;
-
- Time time = Time::current_time();
-
- int64_t n = Search::perft(pos, depth * ONE_PLY);
-
- int e = time.elapsed();
-
- std::cout << "\nNodes " << n
- << "\nTime (ms) " << e
- << "\nNodes/second " << int(n / (e / 1000.0)) << std::endl;
+ Threads.start_searching(pos, limits, searchMoves, SetupStates);