Discussion thread for day 7 of the Advent of Code - https://adventofcode.com/2023/day/7
@patrick_digan wrote:
Probably not the straightest path there but it worked.
If you use Ctrl Shift + it would be a straighter path 😉
It's not pretty, but it worked. I edited part 2 right on top of part 1, so this won't work for part 1.
Tried to get too cute on p2 and simplified it.
My Solution:
Solved! That was a fun one. I ended up with a very bizarre detour with a couple of Multi-Rows to handle the Jokers and getting them sorted properly
Fortunately I was able to use most of my solution for part 1 for part 2. Detour tools for the win!
Another easy one today...
if [No. Jacks]=0 THEN [Hand Rank]
ELSEIF [Hand Rank]=1 then 1
elseif [Hand Rank]=2 AND [No. Jacks]>0 then 1
elseif [Hand Rank]=3 AND [No. Jacks]>0 then 1
elseif [Hand Rank]=4 AND [No. Jacks]>0 THEN 2
elseif [Hand Rank]=5 AND [No. Jacks]=1 then 3
elseif [Hand Rank]=5 AND [No. Jacks]=2 then 2
elseif [Hand Rank]=6 AND [No. Jacks]=1 then 4
elseif [Hand Rank]=6 AND [No. Jacks]=2 then 4
elseif [Hand Rank]=7 AND [No. Jacks]=1 then 6
ELSE [Hand Rank] ENDIF
and the card score was adjusted in the text input.
So there you go, @phottovy , enjoy!
I didn't over think and over engineer my solution to today's problem and anyone who says any different is a big fat liar!!!!!!!!!!!!!!!!!!!!