To install `mistlecode` yourself, run `devtools::install_github('guslipkin/mistlecode')`.
Also loading: cipheR data.table dplyr purrr slider stringr tidyverse
2019-03: Crossed Wires
Part 1
dtM <- lapply(dtMM, expand_directions, preserve_data = TRUE)
dtM[[1]] <- follow_directions(dtM[[1]], 0, 0, preserve_data = TRUE)
dtM[[2]] <- follow_directions(dtM[[2]], 0, 0, preserve_data = TRUE)
inner_join(dtM[[1]], dtM[[2]], by = c("row", "col")) |>
mutate(dist = abs(row) + abs(col)) |>
arrange(dist) |>
head(1) |>
pull(dist)
[1] 1264