Put multispeed missiles back in
authorJustin Worthe <justin@worthe-it.co.za>
Fri, 1 Jun 2018 21:36:08 +0000 (23:36 +0200)
committerJustin Worthe <justin@worthe-it.co.za>
Fri, 1 Jun 2018 21:36:08 +0000 (23:36 +0200)
src/engine/mod.rs
src/json.rs

index 064aac2..beb6fb4 100644 (file)
@@ -198,7 +198,7 @@ impl GameState {
     where F: FnMut(&mut Point) {
         let mut missiles_len = missiles.len();
         'missile_loop: for m in (0..missiles.len()).rev() {
-            //for _ in 0..missiles[m].speed { // only speed of 1 in round 1
+            for _ in 0..missiles[m].speed {
                 wrapping_move_fn(&mut missiles[m].pos);
                 if missiles[m].pos.x >= settings.size.x {
                     let damage = cmp::min(missiles[m].damage, opponent.health);
@@ -225,7 +225,7 @@ impl GameState {
                         }
                     }
                 }
-            //}
+            }
         }
         missiles.truncate(missiles_len);
     }
index 5830bd9..a8eb012 100644 (file)
@@ -28,7 +28,8 @@ struct State {
 #[derive(Deserialize)]
 #[serde(rename_all = "camelCase")]
 struct GameDetails {
-    //round: u32,
+    //round: u16,
+    //max_rounds: u16,
     map_width: u8,
     map_height: u8,
     round_income_energy: u16,