Fix left side bounds checking

main
Elijah Voigt 4 days ago
parent 39b11593ca
commit a13aa62a1f

@ -91,7 +91,7 @@ impl GridPosition {
let x = self.x as isize + other_x; let x = self.x as isize + other_x;
let y = self.y as isize + other_y; let y = self.y as isize + other_y;
if x > X_MAX as isize { if x >= X_MAX as isize {
Err(GameError::OutOfBoundsLeft) Err(GameError::OutOfBoundsLeft)
} else if x < 0 { } else if x < 0 {
Err(GameError::OutOfBoundsRight) Err(GameError::OutOfBoundsRight)

Loading…
Cancel
Save