day18

package
v0.0.0-...-9c9a4a3 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExternalSurface

func ExternalSurface(droplets []XYZ) int

func FindMapMinMax

func FindMapMinMax(droplets []XYZ) (map[XYZ]bool, XYZ, XYZ)

func SurfaceArea

func SurfaceArea(droplets []XYZ) int

Types

type MinMax

type MinMax struct {
	MinX int
	MinY int
	MaxX int
	MaxY int
}

type Parser

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

func NewParser

func NewParser(s Scanner) *Parser

func (*Parser) ScanDroplets

func (p *Parser) ScanDroplets() []XYZ

type Scanner

type Scanner interface {
	Scan() bool
	Text() string
}

type XYZ

type XYZ struct {
	X int
	Y int
	Z int
}

func (XYZ) Sum

func (xyz XYZ) Sum(other XYZ) XYZ

Jump to

Keyboard shortcuts

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