Update code to use advent lib.

This commit is contained in:
2020-12-05 16:06:51 -08:00
parent e9d0701b4c
commit 479b1d745e
7 changed files with 14 additions and 6 deletions

View File

@@ -1,4 +1,5 @@
INPUT = File.read("day2.txt").lines.map(&.chomp)
require "advent"
INPUT = input(2020, 2).lines.map(&.chomp)
def parse(line)
data = line.match(/([0-9]+)-([0-9]+) ([a-z]): ([a-z]+)/)