diff options
author | Justin Worthe <justin@worthe-it.co.za> | 2018-12-29 21:19:31 +0200 |
---|---|---|
committer | Justin Worthe <justin@worthe-it.co.za> | 2018-12-29 21:19:31 +0200 |
commit | edb002c3b073ae18c1e410ec49f362c49d063bc2 (patch) | |
tree | e8133ec12474a2d817c6909cb4980c812827d083 | |
parent | 0d40cefa158f6273c37d6f1eacce50ffb637a523 (diff) |
Minor cleanup
-rw-r--r-- | src/main.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/main.rs b/src/main.rs index 16e2836..b05ae44 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,5 +1,3 @@ -#![warn(clippy)] - #[macro_use] extern crate gate; @@ -66,13 +64,13 @@ impl App<AssetId> for BugBasherGame { if self.time_to_next_bug <= 0. { let mean = if self.total_time < 30. { - f64::max(4. - (self.total_time as f64 * 0.2), 1.) + f64::max(4. - (self.total_time * 0.2), 1.) } else if self.total_time < 60. { - f64::max(1. - ((self.total_time as f64 - 30.) * 0.05), 0.5) + f64::max(1. - ((self.total_time - 30.) * 0.05), 0.5) } else if self.total_time < 90. { - f64::max(0.5 - ((self.total_time as f64 - 60.) * 0.05), 0.3) + f64::max(0.5 - ((self.total_time - 60.) * 0.05), 0.3) } else { - f64::max(0.3 - ((self.total_time as f64 - 90.) * 0.005), 0.2) + f64::max(0.3 - ((self.total_time - 90.) * 0.005), 0.2) }; let sd = mean / 3.; |