d3

Imports

Imports #

"advent2024/pkg/solver"
"fmt"
"io"
"log"
"regexp"
"strconv"
"advent2024/pkg/solver"
"context"
"fmt"
"io"
"strconv"

Constants & Variables

day var #

var day = "d3"

Structs

PuzzleStruct struct #

type PuzzleStruct struct {
entries *[]puzzleEntry
}

PuzzleStructWithCtx struct #

type PuzzleStructWithCtx struct {
PuzzleStruct
}

puzzleEntry struct #

type puzzleEntry struct {
instruction string
i int
j int
}

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()

parseInput function #

func parseInput(s string) *[]puzzleEntry

validateInput function #

func validateInput(entries *[]puzzleEntry) error