Commit 0e5f0d26 authored by Alexander Gehrke's avatar Alexander Gehrke
Browse files

Put everything in a package (aoc2020)

parent a5a135f5
package aoc2020
def day1(input: List[Int]): String =
List(2, 3).map(groupSize => input.groupWithSum(2020, groupSize).product)
.mkString("\n")
......
package aoc2020
def day2(passwords: List[String]): String =
List(
passwords.count(validAmount),
......
package aoc2020
def day3(trees: List[Vector[Boolean]]): String =
treesOnSlope(trees, 3).toString + "\n" + List(
treesOnSlopeRec(trees, 1, 1),
......
package aoc2020
import aoc2020.lib.Passports._
def day4(input: List[String]): String =
......
package aoc2020
import aoc2020.lib._
def day5(input: List[String]): String =
......
package aoc2020
@main def runDay(inputDir: String, day: Int): Unit =
given Location(inputDir, day)
val out = day match {
......
package aoc2020
import scala.io.Source
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment