From 827835f12f9d453767b2f56710f3c0a006dfab48 Mon Sep 17 00:00:00 2001 From: xuu Date: Thu, 7 Dec 2023 19:29:34 -0700 Subject: [PATCH] fix: forgot to add wild card --- day07/main.go | 1 + day07/main_test.go | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/day07/main.go b/day07/main.go index 309b21f..222b491 100644 --- a/day07/main.go +++ b/day07/main.go @@ -44,6 +44,7 @@ func run(scan *bufio.Scanner) (uint64, uint64) { product1 := calcProduct(game) game.cardOrder = getOrder(2) + game.wildCard = 'J' product2 := calcProduct(game) return product1, product2 diff --git a/day07/main_test.go b/day07/main_test.go index f4226b1..2dccf17 100644 --- a/day07/main_test.go +++ b/day07/main_test.go @@ -40,7 +40,6 @@ func TestHands(t *testing.T) { h = Play{0, []rune("QQQJA"), &game} is.Equal(h.HandType(), "3K-Q") is.Equal(fmt.Sprintf("%x", h.HandStrength()), "4bbbad") - } func TestPower(t *testing.T) { @@ -69,5 +68,5 @@ func TestSolution(t *testing.T) { is.Equal(score1, uint64(248559379)) t.Log("score2", score2) - is.Equal(score2, uint64(248761814)) + is.Equal(score2, uint64(249631254)) }