diff options
Diffstat (limited to 'cameltris/coordinates.py')
-rw-r--r-- | cameltris/coordinates.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/cameltris/coordinates.py b/cameltris/coordinates.py new file mode 100644 index 0000000..a5cee80 --- /dev/null +++ b/cameltris/coordinates.py @@ -0,0 +1,11 @@ +from dataclasses import dataclass + + +@dataclass +class Coordinates: + x: int + y: int + + def __add__(self, other: "Coordinates"): + """ Return the result of the addition of two Coordinates objects. """ + return Coordinates(x=self.x + other.x, y = self.y + other.y) |