Documentation
¶
Overview ¶
Package puzzles declares common interface for puzzle solutions and functionality for register and run them.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidPzzlName means that such puzzle not exist. ErrInvalidPzzlName = errors.New("invalid puzzle name") // ErrInvalidYear means that such year not exist. ErrInvalidYear = errors.New("invalid year") )
View Source
var ErrNotImplemented = errors.New("not implemented")
ErrNotImplemented signal that puzzle in not implemented yet.
Functions ¶
func GetYears ¶ added in v0.2.0
func GetYears() []string
GetYears returns list of available years for solvers.
func NamesByYear ¶ added in v0.2.0
NamesByYear returns a sorted list of the names of the registered puzzle solvers for passed year.
func Register ¶
func Register(solver Solver)
Register makes a puzzle solver available by the provided name. If Register is called twice with the same name or if solver is nil, it panics.
func UnregisterAllSolvers ¶
UnregisterAllSolvers cleans up registered solvers. Use for testing only.
Types ¶
Directories
¶
Path | Synopsis |
---|---|
Package solutions registers solutions of puzzles.
|
Package solutions registers solutions of puzzles. |
2019/day01
Package day01 solves https://adventofcode.com/2019/day/1
|
Package day01 solves https://adventofcode.com/2019/day/1 |
2019/day02
Package day02 solves https://adventofcode.com/2019/day/2
|
Package day02 solves https://adventofcode.com/2019/day/2 |
2019/day03
Package day03 solves https://adventofcode.com/2019/day/3
|
Package day03 solves https://adventofcode.com/2019/day/3 |
2019/day04
Package day04 solves https://adventofcode.com/2019/day/4
|
Package day04 solves https://adventofcode.com/2019/day/4 |
utils
|
|
intcomputer
Package intcomputer provides functionality for Intcode programs calculation Intcode programs are given as a list of integers; these values are used as the initial state for the computer's memory.
|
Package intcomputer provides functionality for Intcode programs calculation Intcode programs are given as a list of integers; these values are used as the initial state for the computer's memory. |
Click to show internal directories.
Click to hide internal directories.