diff options
author | Justin Worthe <justin@worthe-it.co.za> | 2019-08-14 21:56:03 +0200 |
---|---|---|
committer | Justin Worthe <justin@worthe-it.co.za> | 2019-08-14 21:56:03 +0200 |
commit | f4c27b7a834538bc75dd6f986c05635e6c58956c (patch) | |
tree | 5987b36459062d988e88c17bab29adb96a39a8b8 /src/constants.rs | |
parent | 9b98ee64ef54cc434864b77bc20976c1cc166030 (diff) |
Optimized finding valid snowball + bomb moves
Diffstat (limited to 'src/constants.rs')
-rw-r--r-- | src/constants.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/constants.rs b/src/constants.rs index e2db8fb..3f36db4 100644 --- a/src/constants.rs +++ b/src/constants.rs @@ -164,7 +164,8 @@ pub const SHOOT_DAMAGE: i32 = 8; pub const BOMB_RANGE: i8 = 5; pub const BOMB_DAMAGED_SPACES: usize = 13; -pub const BOMB_DAMAGES: [(Vec2d<i8>, i32); BOMB_DAMAGED_SPACES] = [ +pub const BOMB_DAMAGE_RANGE: i8 = 2; +pub const BOMB_DAMAGES: [(Vec2d, i32); BOMB_DAMAGED_SPACES] = [ (Vec2d::new(0, -2), 7), (Vec2d::new(2, 0), 7), (Vec2d::new(0, 2), 7), @@ -182,7 +183,8 @@ pub const BOMB_DAMAGES: [(Vec2d<i8>, i32); BOMB_DAMAGED_SPACES] = [ pub const SNOWBALL_RANGE: i8 = 5; pub const SNOWBALL_FREEZES_SPACES: usize = 9; -pub const SNOWBALL_FREEZES: [Vec2d<i8>; SNOWBALL_FREEZES_SPACES] = [ +pub const SNOWBALL_FREEZE_RANGE: i8 = 1; +pub const SNOWBALL_FREEZES: [Vec2d; SNOWBALL_FREEZES_SPACES] = [ Vec2d::new(-1, -1), Vec2d::new(0, -1), Vec2d::new(1, -1), |