d8

package
v0.0.0-...-f50ab9b Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const REAL_DATA = `` /* 9899-byte string literal not displayed */
View Source
const TEST_DATA = `30373
25512
65332
33549
35390`

Variables

This section is empty.

Functions

This section is empty.

Types

type Grid

type Grid struct {
	// contains filtered or unexported fields
}

func NewGrid

func NewGrid(input string) *Grid

func (*Grid) CountVisibleBottom

func (g *Grid) CountVisibleBottom(treeRow int, treeCol int) int

func (*Grid) CountVisibleLeft

func (g *Grid) CountVisibleLeft(treeRow int, treeCol int) int

func (*Grid) CountVisibleRight

func (g *Grid) CountVisibleRight(treeRow int, treeCol int) int

func (*Grid) CountVisibleTop

func (g *Grid) CountVisibleTop(treeRow int, treeCol int) int

func (*Grid) Get

func (g *Grid) Get(row int, col int) int

func (*Grid) IsVisible

func (g *Grid) IsVisible(treeRow int, treeCol int) (bool, bool, bool, bool)

func (*Grid) IsVisibleFromBottom

func (g *Grid) IsVisibleFromBottom(treeRow int, treeCol int) bool

func (*Grid) IsVisibleFromLeft

func (g *Grid) IsVisibleFromLeft(treeRow int, treeCol int) bool

func (*Grid) IsVisibleFromRight

func (g *Grid) IsVisibleFromRight(treeRow int, treeCol int) bool

func (*Grid) IsVisibleFromTop

func (g *Grid) IsVisibleFromTop(treeRow int, treeCol int) bool

func (*Grid) Put

func (g *Grid) Put(row int, col int, height int)

type Puzzle

type Puzzle struct {
	// contains filtered or unexported fields
}

func NewPuzzle

func NewPuzzle() *Puzzle

func NewPuzzleWithData

func NewPuzzleWithData(input string) *Puzzle

func (*Puzzle) Load

func (puzzle *Puzzle) Load(input string)

func (*Puzzle) Part1

func (puzzle *Puzzle) Part1()

func (*Puzzle) Part2

func (puzzle *Puzzle) Part2()

func (*Puzzle) Run

func (puzzle *Puzzle) Run()

Jump to

Keyboard shortcuts

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