diff --git a/src/simulation.cpp b/src/simulation.cpp index 0b97b33..b8720af 100644 --- a/src/simulation.cpp +++ b/src/simulation.cpp @@ -185,8 +185,7 @@ bool operator!=(Cell const &lhs, Cell const &rhs) { } bool operator<(Cell const &lhs, Cell const &rhs) { - uintptr_t hashl{ uintptr_t(lhs.x * 73856093) ^ uintptr_t(lhs.y * 19349663) }; - uintptr_t hashr{ uintptr_t(rhs.x * 73856093) ^ uintptr_t(rhs.y * 19349663) }; - return hashl < hashr; + if (lhs.y == rhs.y) return lhs.x < rhs.x; + else return lhs.y < rhs.y; } }