feat: add snapshot recording

This commit is contained in:
2025-10-24 17:22:29 +02:00
parent 8542ee81e7
commit db112ada4c
6 changed files with 89 additions and 12 deletions

View File

@@ -8,6 +8,9 @@ class Vec:
self.x: float = x
self.y: float = y
def copy(self) -> Vec:
return Vec(self.x, self.y)
def __add__(self, other: float | Vec) -> Vec:
if isinstance(other, Vec):
return Vec(self.x + other.x, self.y + other.y)