diff --git a/2023/ruby/day_07.rb b/2023/ruby/day_07.rb index ce8eff7..ab62aa0 100644 --- a/2023/ruby/day_07.rb +++ b/2023/ruby/day_07.rb @@ -33,11 +33,10 @@ module PartTwo else counts[-1] += jokers end - strengths = [ + [ HAND_STRENGTH.fetch(counts), *cards.map { CARD_STRENGTH.fetch(_1) }, ] - strengths.map { (?a.ord + _1).chr }.join end end