-
- // RootMoveList::compare_root_moves() is the comparison function used by
- // RootMoveList::sort when sorting the moves. A move m1 is considered to
- // be better than a move m2 if it has a higher score, or if the moves have
- // equal score but m1 has the higher node count.
-
- bool RootMoveList::compare_root_moves(const RootMove &rm1,
- const RootMove &rm2) {
- if (rm1.score != rm2.score)
- return (rm1.score < rm2.score);
-
- return rm1.nodes <= rm2.nodes;
- }
-
-