fn scan_cave(input: &[i32; 3], width: i32, height: i32) -> Grid<Region>
Calculate the erosion level for each region. We swap width and height for a small speed boost without affecting the outcome of the shortest path.