Broken but funny bouncing.

This commit is contained in:
2024-05-08 12:32:16 +02:00
parent 0a74409dcc
commit 54fafe8742
4 changed files with 111 additions and 17 deletions

View File

@@ -8,4 +8,9 @@ impl Direction {
pub fn new(x: isize, y: isize) -> Self {
Self { x, y }
}
pub fn invert(&mut self) {
self.x *= -1;
self.y *= -1;
}
}