From 709b0f471b9a7e0d5e8d2015c18898450f6b0ed8 Mon Sep 17 00:00:00 2001 From: Stefan Harmuth Date: Wed, 22 Dec 2021 09:25:50 +0100 Subject: [PATCH] Coordinate order - not sure which comparison is the "correct" one - can't make up my mind --- tools/coordinate.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/coordinate.py b/tools/coordinate.py index 861b3a8..6057cec 100644 --- a/tools/coordinate.py +++ b/tools/coordinate.py @@ -13,7 +13,7 @@ class DistanceAlgorithm(Enum): CHESSBOARD = 2 -@dataclass(frozen=True, order=True) +@dataclass(frozen=True) class Coordinate: x: int y: int @@ -144,7 +144,6 @@ class Coordinate: else: return Coordinate(self.x - other.x, self.y - other.y, self.z - other.z) - """ def __eq__(self, other): return self.x == other.x and self.y == other.y and self.z == other.z @@ -171,7 +170,6 @@ class Coordinate: return self.x <= other.x and self.y <= other.y else: return self.x <= other.x and self.y <= other.y and self.z <= other.z - """ @staticmethod def generate(from_x: int, to_x: int, from_y: int, to_y: int,