remove end Elf

This commit is contained in:
Luke Hubmayer-Werner 2022-12-01 20:00:08 +10:30
parent 1ea34d196b
commit 6c152a6aae
1 changed files with 3 additions and 4 deletions

View File

@ -1,6 +1,9 @@
import scala.collection.mutable.ArrayBuffer import scala.collection.mutable.ArrayBuffer
import scala.io.Source import scala.io.Source
val filename = "day1-input"
class Elf: class Elf:
var foodCalories = List[Int]() var foodCalories = List[Int]()
var totalCalories = 0 var totalCalories = 0
@ -8,10 +11,6 @@ class Elf:
def calculateTotalCalories(): Int = def calculateTotalCalories(): Int =
totalCalories = foodCalories.sum totalCalories = foodCalories.sum
totalCalories totalCalories
end Elf
val filename = "day1-input"
@main def main() = @main def main() =