day03

package
v0.0.0-...-44539d3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 4, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Part1

func Part1(input string) int

func Part2

func Part2(input string) int

Types

type Element

type Element struct {
	Value  *Value `  @@`
	Dot    string `| @Dot`
	Symbol string `| @Symbol`
	// contains filtered or unexported fields
}

type EngineLine

type EngineLine struct {
	Elements []*Element `@@* Newline`
}

type EngineSchematic

type EngineSchematic struct {
	EngineLines []*EngineLine `@@*`
}

func (*EngineSchematic) CalculatePositions

func (es *EngineSchematic) CalculatePositions()

func (*EngineSchematic) CalculateValueLengths

func (es *EngineSchematic) CalculateValueLengths()

func (*EngineSchematic) GetAdjacentElements

func (es *EngineSchematic) GetAdjacentElements(e *Element) []*Element

type Value

type Value struct {
	Number int `  @Number`
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL