#[derive(Clone, Debug)] pub struct Coord { pub x: isize, pub y: isize } impl Coord { pub fn new(x: isize, y: isize) -> Self { Self { x, y } } pub fn invert(&mut self) { self.x *= -1; self.y *= -1; } }