Coordinate order - not sure which comparison is the "correct" one - can't make up my mind
This commit is contained in:
parent
7656e90984
commit
709b0f471b
@ -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,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user