Skip to content

Puzzle

Advent of Code 2023-Day 7: Camel Cards

#lang iracket/lang #:require racket
(require "../advent.rkt")

Day 7 involves simulating a card game. Our input looks like:

...
8J833 494
6AJT8 318
AA4QQ 125
62KK6 876
7A7QK 241
...

The left side is our card hand. The right side is our bid amount. As always, we begin with parsing. For our purposes of illustration, I'll skip the first 20 hands to get to a more interesting one with a J: