Documentation ¶
Index ¶
- func A(input *advent.Input) (int, error)
- func B(input *advent.Input) (int, error)
- type Basin
- type BasinFinder
- type HeightMap
- func (m *HeightMap) GetAdjacentPoints(pt utils.Point) []utils.Point
- func (m *HeightMap) Height() int
- func (m *HeightMap) HeightAt(pt utils.Point) int
- func (m *HeightMap) IsLowPoint(pt utils.Point) bool
- func (m *HeightMap) IsOnMap(pt utils.Point) bool
- func (m *HeightMap) RiskLevel(pt utils.Point) int
- func (m *HeightMap) Width() int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BasinFinder ¶
type BasinFinder struct {
// contains filtered or unexported fields
}
func NewBasinFinder ¶
func NewBasinFinder(input *advent.Input) BasinFinder
func (*BasinFinder) FindAll ¶
func (bf *BasinFinder) FindAll()
func (*BasinFinder) FindBasinFrom ¶
func (bf *BasinFinder) FindBasinFrom(pt utils.Point)
FindBasinFrom recursively visits all points in a basin from some starting point
func (*BasinFinder) HasVisited ¶
func (bf *BasinFinder) HasVisited(pt utils.Point) bool
func (*BasinFinder) Visit ¶
func (bf *BasinFinder) Visit(pt utils.Point)
Click to show internal directories.
Click to hide internal directories.