struct Vector2 {
x: float
y: float
}
struct GameObject {
health: int
damage: int
}
impl Vector2 {
def new(x: float, y: float) -> Vector2 {
return Vector2 { x: x, y: y }
}
}
impl GameObject {
def new(health: int, damage: int) -> GameObject {
return GameObject { health: health, damage: damage }
}
def take_damage(mut self, amount: int) {
self.health -= amount
}
}
def main() -> int {
return 0
}