Functions
Byte
method
#
func (o Orientation) Byte() byte
Error
method
#
func (e NotInFieldError) Error() string
Error
method
#
func (e LoopingError) Error() string
Init
method
#
func (p *PuzzleStruct) Init(reader io.Reader) error
InitCtx
method
#
func (p *PuzzleStructWithCtx) InitCtx(ctx context.Context, reader io.Reader) error
Move
method
#
func (g *Guard) Move(field *[][]byte) error
NewGuard
function
#
func NewGuard(x int, y int, o Orientation) Guard
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)
findGuard
function
#
func findGuard(field *[][]byte) (int, int, error)
init
function
#
func init()
init
function
#
func init()
parseInput
function
#
func parseInput(sc *bufio.Scanner) (*[][]byte, error)
toOrientation
function
#
func toOrientation(b byte) (Orientation, error)
validateInput
function
#
func validateInput(field *[][]byte) error