- *cur = MOVE_NONE;
- limits.time = time[pos.side_to_move()];
- limits.increment = inc[pos.side_to_move()];
-
- return think(pos, limits, searchMoves);
- }
-
-
- // perft() is called when engine receives the "perft" command.
- // The function calls perft() passing the required search depth
- // then prints counted leaf nodes and elapsed time.
-
- void perft(Position& pos, UCIParser& up) {
-
- int depth, time;
- int64_t n;
-
- if (!(up >> depth))
- return;
-
- time = get_system_time();
-
- n = perft(pos, depth * ONE_PLY);
-
- time = get_system_time() - time;
-
- std::cout << "\nNodes " << n
- << "\nTime (ms) " << time
- << "\nNodes/second " << int(n / (time / 1000.0)) << std::endl;