inst/run-day05.R

library(adventofcode21)
x <- readLines("./inst/input05.txt")

p1 <- f05a_count_intersections(x)
p2 <- f05a_count_intersections(x, include_diagonals = TRUE)

stopifnot(p1 == aoc_solutions$day05a)
stopifnot(p2 == aoc_solutions$day05b)
tjmahr/adventofcode21 documentation built on Jan. 8, 2022, 10:41 a.m.