diff --git a/2022/day1.scala b/2022/day1.scala index 7d586d8..0e0585b 100644 --- a/2022/day1.scala +++ b/2022/day1.scala @@ -1,6 +1,9 @@ import scala.collection.mutable.ArrayBuffer import scala.io.Source +val filename = "day1-input" + + class Elf: var foodCalories = List[Int]() var totalCalories = 0 @@ -8,10 +11,6 @@ class Elf: def calculateTotalCalories(): Int = totalCalories = foodCalories.sum totalCalories -end Elf - - -val filename = "day1-input" @main def main() =