From 98bc464bd7980494c090960a55613d21167d3e36 Mon Sep 17 00:00:00 2001 From: twentylemon Date: Sat, 2 Dec 2023 09:23:52 -0500 Subject: [PATCH] :art: format --- src/main/scala/org/lemon/advent/year2023/Day02.scala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/scala/org/lemon/advent/year2023/Day02.scala b/src/main/scala/org/lemon/advent/year2023/Day02.scala index 0c88c9c..5eb735e 100644 --- a/src/main/scala/org/lemon/advent/year2023/Day02.scala +++ b/src/main/scala/org/lemon/advent/year2023/Day02.scala @@ -8,14 +8,15 @@ private object Day02: def parsePulls(pulls: String): Seq[Seq[Dice]] = pulls.split(";") .map(_.split(",")) .map(_.map(x => x.strip)) - .map(_.map(dice => dice match - case s"$num $colour" => Dice(num.toInt, colour) + .map(_.map(dice => + dice match + case s"$num $colour" => Dice(num.toInt, colour) )) .map(_.toSeq) .toSeq def parse(input: String): Seq[Game] = input.linesIterator - .map(line => line match + .map(_ match case s"Game $id: $games" => Game(id.toInt, parsePulls(games)) ) .toSeq @@ -40,4 +41,3 @@ private object Day02: .map(_.values) .map(_.product) .sum - \ No newline at end of file