From 83199de370f15c961502dc37cc7fc09e2be2030f Mon Sep 17 00:00:00 2001 From: "J.J" Date: Sun, 17 Dec 2023 21:28:03 -0500 Subject: day 17 racket complete --- aoc2023/src/day17/solve.gleam | 31 ++++++------------------------- 1 file changed, 6 insertions(+), 25 deletions(-) (limited to 'aoc2023/src/day17') diff --git a/aoc2023/src/day17/solve.gleam b/aoc2023/src/day17/solve.gleam index 3ed632c..431dcc7 100644 --- a/aoc2023/src/day17/solve.gleam +++ b/aoc2023/src/day17/solve.gleam @@ -1,36 +1,17 @@ import adglent.{First, Second} import gleam/io +import gleam/string import utilities/array2d.{type Posn, Posn} -type Direction { - North - South - East - West -} - -fn turn_dirs(dir: Direction) { - case dir { - North | South -> [East, West] - East | West -> [North, South] - } -} - -fn delta(dir: Direction) { - case dir { - North -> Posn(-1, 0) - South -> Posn(1, 0) - East -> Posn(0, 1) - West -> Posn(0, -1) - } -} - pub fn part1(input: String) { - todo as "Implement solution to part 1" + input + |> array2d.parse_grid + |> string.inspect } pub fn part2(input: String) { - todo as "Implement solution to part 2" + input + |> string.inspect } pub fn main() { -- cgit v1.2.3