struct RootMove {
explicit RootMove(Move m) : pv(1, m) {}
-
- bool operator<(const RootMove& m) const { return m.score < score; } // Descending sort
- bool operator==(const Move& m) const { return pv[0] == m; }
bool extract_ponder_from_tt(Position& pos);
+ bool operator==(const Move& m) const { return pv[0] == m; }
+ bool operator<(const RootMove& m) const { // Sort in descending order
+ return m.score != score ? m.score < score
+ : m.previousScore < previousScore;
+ }
Value score = -VALUE_INFINITE;
Value previousScore = -VALUE_INFINITE;