From 567453547849f2cf20f11bcef46fffc732520668 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tristan=20Dani=C3=ABl=20Maat?= Date: Thu, 7 Dec 2023 18:23:16 +0100 Subject: [PATCH] day7: Remove some spurious comments --- day7/day7.kt | 7 ------- 1 file changed, 7 deletions(-) diff --git a/day7/day7.kt b/day7/day7.kt index f454c07..33de794 100644 --- a/day7/day7.kt +++ b/day7/day7.kt @@ -17,12 +17,6 @@ fun part1(bets: List>): Int { } fun part2(bets: List>): Int { - // println( - // bets.sortedBy { handValueJoker(it.first) }.forEach { - // println("${it} - ${handValueJoker(it.first)}") - // } - // ) - return bets.sortedBy { handValueJoker(it.first) }.foldIndexed(0) { i, acc, bet -> acc + (i + 1) * bet.second } @@ -120,7 +114,6 @@ fun handValueJoker(cards: Hand): Int { // Since the tie breaker in this case is again the value of the // card, this is kind of recursive. return typeJoker(cards) + cards.fold(0) { acc, label -> acc * 13 + cardValueJoker(label) } - // 247838255 is too low } fun parseHands(input: File): List> {