Functions
Init
method
#
func (p *PuzzleStruct) Init(reader io.Reader) error
InitCtx
method
#
func (p *PuzzleStructWithCtx) InitCtx(ctx context.Context, reader io.Reader) error
NewSolver
function
#
func NewSolver() *PuzzleStruct
NewSolverWithCtx
function
#
func NewSolverWithCtx() *PuzzleStructWithCtx
Solve
method
#
func (p *PuzzleStruct) Solve(part int) (string, error)
SolveCtx
method
#
func (p *PuzzleStructWithCtx) SolveCtx(ctx context.Context, part int) (string, error)
init
function
#
func init()
init
function
#
func init()
newRules
function
#
func newRules() Rules
parseInput
function
#
func parseInput(sc *bufio.Scanner) (*[2][][]int, error)
processRules
function
#
func processRules(parsedRules [][]int) map[int]Rules
sortFunc
method
#
func (p *PuzzleStruct) sortFunc() (func(a int, b int) int)
updateRules
method
#
func (r *Rules) updateRules(before []int, after []int)
validateInput
function
#
func validateInput(rules *map[int]Rules, updates *[][]int) error