diff options
Diffstat (limited to 'src/constants.rs')
-rw-r--r-- | src/constants.rs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/constants.rs b/src/constants.rs index dcda1d5..fd1263a 100644 --- a/src/constants.rs +++ b/src/constants.rs @@ -1,3 +1,5 @@ +use crate::geometry::Vec2d; + pub const MAP_SIZE: usize = 33; pub const MAP_ROW_SIZE: [MapRow; MAP_SIZE] = [ MapRow { start_bit: 0, x_offset: 11 }, @@ -46,4 +48,26 @@ impl MapRow { pub fn len(&self) -> usize { MAP_SIZE - 2 * self.x_offset } + + pub fn is_empty(&self) -> bool { + self.len() == 0 + } } + + +pub const BOMB_DAMAGED_SPACES: usize = 13; +pub const BOMB_DAMAGES: [(Vec2d<i8>, i32); BOMB_DAMAGED_SPACES] = [ + (Vec2d::new(0, -2), 7), + (Vec2d::new(2, 0), 7), + (Vec2d::new(0, 2), 7), + (Vec2d::new(-2, 0), 7), + (Vec2d::new(1, -1), 11), + (Vec2d::new(1, 1), 11), + (Vec2d::new(-1, 1), 11), + (Vec2d::new(-1, -1), 11), + (Vec2d::new(0, -1), 13), + (Vec2d::new(0, -1), 13), + (Vec2d::new(0, -1), 13), + (Vec2d::new(0, -1), 13), + (Vec2d::new(0, 0), 20) +]; |