day11

package
v0.0.0-...-acf6961 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Part1

func Part1(g Grid) int

func Part2

func Part2(g Grid) int

Types

type Grid

type Grid map[advent2021.XY]Octopus

func NewGrid

func NewGrid(in []string) Grid

func (Grid) Clone

func (g Grid) Clone() Grid

func (Grid) Flash

func (g Grid) Flash(pos advent2021.XY) int

func (Grid) IncreaseEnergy

func (g Grid) IncreaseEnergy(pos advent2021.XY) int

func (Grid) Step

func (g Grid) Step() int

type Octopus

type Octopus struct {
	Energy     int
	HasFlashed bool
}

Jump to

Keyboard shortcuts

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