Module aoc::y23d07

source ·
Expand description

Advent of Code 2023 Day 7: https://adventofcode.com/2023/day/7

Today’s challenge was not terribly difficult to understand or to implement but ended up taking me quite a bit of time to actually complete because the implementation started to grow quite large. In part two I had a bug where I was returning false from the is_kind_of_hand functions when I should have been just letting the value equal 0 if there weren’t any jokers. The general strategy that I adopted today is to build a custom type Hand which implements its own sorting functions based on the input from the prompt. Then the actual daily function just needs to parse the input and sort the result and the work is mostly done.

Functions§

  • The solution for the day seven challenge.