refactor: intentionally unsafe leak to drop annoying lifetimes, use IVec2 in all remaining spots

This commit is contained in:
2025-07-24 16:04:47 -05:00
parent f41c550bb8
commit 0a82aea922
10 changed files with 135 additions and 96 deletions

View File

@@ -114,7 +114,7 @@ impl Moving for MovableEntity {
);
}
fn next_cell(&self, direction: Option<Direction>) -> IVec2 {
let (x, y) = direction.unwrap_or(self.direction).offset();
let IVec2 { x, y } = direction.unwrap_or(self.direction).offset();
IVec2::new(self.base.cell_position.x as i32 + x, self.base.cell_position.y as i32 + y)
}
fn is_wall_ahead(&self, direction: Option<Direction>) -> bool {