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()
is
method
#
func (p *PuzzleStruct) is(x int, y int, c byte) bool
neighbors
function
#
func neighbors(x int, y int) [][2]int
next
function
#
func next(x1 int, y1 int, x2 int, y2 int) [2]int
parseInput
function
#
func parseInput(sc *bufio.Scanner) (*[][]byte, error)
validateInput
function
#
func validateInput(field *[][]byte) error
xmas
method
#
func (p *PuzzleStruct) xmas(x int, y int) int
xmasPart2
method
#
func (p *PuzzleStruct) xmasPart2(x int, y int) bool