makeGrid' :: [Coord] -> Int -> Grid2
makeGrid' coords maxDist =
  let minX = minimum $ map fst coords
      minY = minimum $ map snd coords
      maxX = maximum $ map fst coords
      maxY = maximum $ map snd coords
      b = ((minX, minY), (maxX, maxY))
      withIdx = zip [1..] coords
      points = do
        x <- [minX..maxX]
        y <- [minY..maxY]
        let dist = sum $ map (manhattan (x,y)) coords
        pure ((x,y), dist < maxDist)
   in Arr.array b points
makeGrid' :: [Coord] -> Int -> Grid2
makeGrid' coords maxDist =
  let minX = minimum $ map fst coords
      minY = minimum $ map snd coords
      maxX = maximum $ map fst coords
      maxY = maximum $ map snd coords
      b = ((minX, minY), (maxX, maxY))
      withIdx = zip [1..] coords
      points = do
        x <- [minX..maxX]
        y <- [minY..maxY]
        let dist = sum $ map (manhattan (x,y)) coords
        pure ((x,y), dist < maxDist)
   in Arr.array b points
makeGrid' coords maxDist =
  let minX = minimum $ map fst coords
      minY = minimum $ map snd coords
      maxX = maximum $ map fst coords
      maxY = maximum $ map snd coords
      b = ((minX, minY), (maxX, maxY))
      withIdx = zip [1..] coords
      points = do
        x <- [minX..maxX]
        y <- [minY..maxY]
        let dist = sum $ map (manhattan (x,y)) coords
        pure ((x,y), dist < maxDist)
   in Arr.array b points