day17_2020

package
v0.0.0-...-359cf57 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Boundaries3D

type Boundaries3D struct {
	XMin, XMax int
	YMin, YMax int
	ZMin, ZMax int
}

type Boundaries4D

type Boundaries4D struct {
	XMin, XMax int
	YMin, YMax int
	ZMin, ZMax int
	WMin, WMax int
}

type Coordinate3DChange

type Coordinate3DChange struct {
	Coordinates3D
	Exists bool
}

type Coordinate4DChange

type Coordinate4DChange struct {
	Coordinates4D
	Exists bool
}

type Coordinates3D

type Coordinates3D struct {
	X, Y, Z int
}

type Coordinates4D

type Coordinates4D struct {
	X, Y, Z, W int
}

type Cubes3D

type Cubes3D map[Coordinates3D]bool

func (*Cubes3D) Active

func (c *Cubes3D) Active() int

func (*Cubes3D) Boundaries

func (c *Cubes3D) Boundaries() Boundaries3D

func (*Cubes3D) Clone

func (c *Cubes3D) Clone() *Cubes3D

func (*Cubes3D) Exists

func (c *Cubes3D) Exists(coords Coordinates3D) bool

func (*Cubes3D) Iterate

func (c *Cubes3D) Iterate(times int) *Cubes3D

func (*Cubes3D) IterateOnce

func (c *Cubes3D) IterateOnce() *Cubes3D

func (*Cubes3D) NeighborsActive

func (c *Cubes3D) NeighborsActive(coords Coordinates3D) int

type Cubes4D

type Cubes4D map[Coordinates4D]bool

func (*Cubes4D) Active

func (c *Cubes4D) Active() int

func (*Cubes4D) Boundaries

func (c *Cubes4D) Boundaries() Boundaries4D

func (*Cubes4D) Clone

func (c *Cubes4D) Clone() *Cubes4D

func (*Cubes4D) Exists

func (c *Cubes4D) Exists(coords Coordinates4D) bool

func (*Cubes4D) Iterate

func (c *Cubes4D) Iterate(times int) *Cubes4D

func (*Cubes4D) IterateOnce

func (c *Cubes4D) IterateOnce() *Cubes4D

func (*Cubes4D) NeighborsActive

func (c *Cubes4D) NeighborsActive(coords Coordinates4D) int

type Solver

type Solver struct {
	Cube4D Cubes4D
	Cube3D Cubes3D
}

func NewSolver

func NewSolver() *Solver

func (*Solver) Part1

func (s *Solver) Part1() (string, error)

func (*Solver) Part2

func (s *Solver) Part2() (string, error)

func (*Solver) ProcessInput

func (s *Solver) ProcessInput(input string) error

Jump to

Keyboard shortcuts

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