Day 22: Debugs on autoresizing map
authorJustin Worthe <justin@worthe-it.co.za>
Sun, 23 Dec 2018 07:51:27 +0000 (09:51 +0200)
committerJustin Worthe <justin@worthe-it.co.za>
Sun, 23 Dec 2018 07:51:27 +0000 (09:51 +0200)
src/bin/day_22.rs

index 2ac0d82..f9013cf 100644 (file)
@@ -5,7 +5,6 @@ use std::error::Error;
 use std::path::PathBuf;
 
 use std::u32;
-use std::cmp;
 use std::collections::{HashMap, HashSet};
 
 // cargo watch -cs "cargo run --release --bin day_22"
@@ -106,10 +105,12 @@ fn main() -> Result<(), Box<Error>> {
         if current.y+1 >= map_height {
             map_height *= 2;
             map = build_map(map_width, map_height, depth, target_x, target_y);
+            debug!(map_height);
         }
         if current.x+1 >= map_width {
             map_width *= 2;
             map = build_map(map_width, map_height, depth, target_x, target_y);
+            debug!(map_width);
         }
 
         for (adjacent, further) in current.adjacent(&map) {