paut.aoc

package paut.aoc

Type members

Classlikes

implicit class ExampleSolution[A](val sol: A)
abstract class Problem[A](val day: Int, val year: Int)(val part: Int)(val exampleSolution: ExampleSolution[A], val i: Int) extends App with ProblemOps[A]

An abstract class for solving a problem from Advent of Code.

An abstract class for solving a problem from Advent of Code.

Value parameters:
day

the day of the year the problem is from

exampleSolution

the expected solution for the example input

i

what example file input to use, defaults to 1

part

one or two

year

the year the problem is from

trait ProblemOps[A]
case class Result(year: Int, day: Int, part: Int, solution: String, time: Double, timestamp: LocalDateTime, submitted: Boolean)

A class for representing the result of solving, or an attempt at solving, a problem from Advent of Code.

A class for representing the result of solving, or an attempt at solving, a problem from Advent of Code.

Value parameters:
day

the day in december which the problem is from

part

one or two

solution

a solution to the problem

submitted

whether the solution was submitted to and verified on the Advent of Code website

time

the time it took to solve the problem

timestamp

the time the problem was solved

year

the year which the problem is from

Companion:
object
object Result
Companion:
class
case object Skip extends ExampleSolution[Any]

Used in the constructor of a subclass to the abstract Problem class in order to skip evaluation of the example input

Used in the constructor of a subclass to the abstract Problem class in order to skip evaluation of the example input

object Testing
case class TimedEval[A](duration: Double, result: A)

A simple wrapper class that includes the result of an evaluation and the time (in seconds) it took to evaluate it

A simple wrapper class that includes the result of an evaluation and the time (in seconds) it took to evaluate it

Value parameters:
result

The final evaluation

time

Time elapsed while evaluating, in seconds

Companion:
object
object TimedEval
Companion:
class

Implicits

Implicits

final implicit def ExampleSolution[A](sol: A): ExampleSolution[A]