aboutsummaryrefslogtreecommitdiff
path: root/2022
diff options
context:
space:
mode:
authorHunky Jimpjorps <thechairman@thechairman.info>2022-12-21 00:05:52 -0500
committerHunky Jimpjorps <thechairman@thechairman.info>2022-12-21 00:05:52 -0500
commit545888b248db22805e9bd24b4fea1ce0524fb0be (patch)
tree02a1646ebbb3137bae7e2cd10d80128453215bbb /2022
parent64acb2806f8eda0843a688f5d3fe186b25db8646 (diff)
downloadgleam_aoc-545888b248db22805e9bd24b4fea1ce0524fb0be.tar.gz
gleam_aoc-545888b248db22805e9bd24b4fea1ce0524fb0be.zip
day 19 in progress
Diffstat (limited to '2022')
-rw-r--r--2022/day-19/day-19.rkt11
1 files changed, 11 insertions, 0 deletions
diff --git a/2022/day-19/day-19.rkt b/2022/day-19/day-19.rkt
new file mode 100644
index 0000000..1400bf2
--- /dev/null
+++ b/2022/day-19/day-19.rkt
@@ -0,0 +1,11 @@
+#lang racket
+
+(require advent-of-code
+ threading)
+
+(struct blueprint (id ore clay obsidian geode))
+
+(define (parse-line str)
+ (match (~> str (string-replace #px"[^\\d\\s]" "") string-split)
+ [(list id ore clay obsidian-ore obsidian-clay geode-ore geode-obsidian)
+ (blueprint id ore clay (cons obsidian-ore obsidian-clay) (cons geode-ore geode-obsidian))]))