diff options
author | Justin Worthe <justin@worthe-it.co.za> | 2019-08-13 22:00:10 +0200 |
---|---|---|
committer | Justin Worthe <justin@worthe-it.co.za> | 2019-08-13 22:00:10 +0200 |
commit | dabedf442d65fcaec36d0a30ed3ed2327b39a44d (patch) | |
tree | a9bbcb4e97dcb98050fd872997ace284f2f764e0 /src/game | |
parent | 33b9c9e05a3693d944342753288fda824f0da13c (diff) |
Trimming down on redundant code and tweaking perf
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/player.rs | 22 | ||||
-rw-r--r-- | src/game/powerup.rs | 1 |
2 files changed, 0 insertions, 23 deletions
diff --git a/src/game/player.rs b/src/game/player.rs index 8b63f9f..3d86c6d 100644 --- a/src/game/player.rs +++ b/src/game/player.rs @@ -14,8 +14,6 @@ pub struct Worm { pub id: i32, pub health: i32, pub position: Point2d<i8>, - pub weapon_damage: i32, - pub weapon_range: u8, pub bombs: u8, pub snowballs: u8, pub rounds_until_unfrozen: u8, @@ -113,8 +111,6 @@ mod test { id: 1, health: 50, position: Point2d::new(0, 0), - weapon_damage: 5, - weapon_range: 5, rounds_until_unfrozen: 0, bombs: 0, snowballs: 0, @@ -123,8 +119,6 @@ mod test { id: 2, health: 10, position: Point2d::new(0, 0), - weapon_damage: 5, - weapon_range: 5, rounds_until_unfrozen: 0, bombs: 0, snowballs: 0, @@ -133,8 +127,6 @@ mod test { id: 3, health: -2, position: Point2d::new(0, 0), - weapon_damage: 5, - weapon_range: 5, rounds_until_unfrozen: 0, bombs: 0, snowballs: 0, @@ -162,8 +154,6 @@ mod test { id: 1, health: 0, position: Point2d::new(0, 0), - weapon_damage: 5, - weapon_range: 5, rounds_until_unfrozen: 0, bombs: 0, snowballs: 0, @@ -172,8 +162,6 @@ mod test { id: 2, health: 10, position: Point2d::new(0, 0), - weapon_damage: 5, - weapon_range: 5, rounds_until_unfrozen: 0, bombs: 0, snowballs: 0, @@ -182,8 +170,6 @@ mod test { id: 3, health: 2, position: Point2d::new(0, 0), - weapon_damage: 5, - weapon_range: 5, rounds_until_unfrozen: 0, bombs: 0, snowballs: 0, @@ -211,8 +197,6 @@ mod test { id: 1, health: 0, position: Point2d::new(0, 0), - weapon_damage: 5, - weapon_range: 5, rounds_until_unfrozen: 0, bombs: 0, snowballs: 0, @@ -221,8 +205,6 @@ mod test { id: 2, health: 10, position: Point2d::new(0, 0), - weapon_damage: 5, - weapon_range: 5, rounds_until_unfrozen: 0, bombs: 0, snowballs: 0, @@ -231,8 +213,6 @@ mod test { id: 3, health: 2, position: Point2d::new(0, 0), - weapon_damage: 5, - weapon_range: 5, rounds_until_unfrozen: 0, bombs: 0, snowballs: 0, @@ -260,8 +240,6 @@ mod test { id: 1, health: -10, position: Point2d::new(0, 0), - weapon_damage: 5, - weapon_range: 5, rounds_until_unfrozen: 0, bombs: 0, snowballs: 0, diff --git a/src/game/powerup.rs b/src/game/powerup.rs index 2f07816..f8a8e2f 100644 --- a/src/game/powerup.rs +++ b/src/game/powerup.rs @@ -3,5 +3,4 @@ use crate::geometry::*; #[derive(Debug, PartialEq, Eq, Clone, Copy)] pub struct Powerup { pub position: Point2d<i8>, - pub value: i32 } |