[Move] Implement < operator
This commit is contained in:
10
Move.cpp
10
Move.cpp
@@ -47,9 +47,13 @@ std::ostream &operator<<(std::ostream &os, const Move &move) {
|
||||
}
|
||||
|
||||
bool operator<(const Move &lhs, const Move &rhs) {
|
||||
(void) lhs;
|
||||
(void) rhs;
|
||||
return false;
|
||||
if (!(lhs.from() == rhs.from()))
|
||||
return lhs.from() < rhs.from();
|
||||
|
||||
if (!(lhs.to() == rhs.to()))
|
||||
return lhs.to() < rhs.to();
|
||||
|
||||
return lhs.promotion() < rhs.promotion();
|
||||
}
|
||||
|
||||
bool operator==(const Move &lhs, const Move &rhs) {
|
||||
|
Reference in New Issue
Block a user