Advent of Code 2022 - Day 2Rock Paper Scissors
| Problem statement | Source code | Tags: Brute force
Part 1
Just compute the score for each round based on the given rules.
outcomes records all possible outcomes of the game:
Part 2
I want to keep the same score function from part 1, so instead of sumMap score games, I use sumMap (\g -> score (fst g, shape g)) games, where shape computes the shape I need to play based on the desired outcome: