conway4

package
v0.0.0-...-0235693 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Grid

type Grid struct {
	Current map[Pos]bool
	Next    map[Pos]bool
	Min     Pos
	Max     Pos
}

func NewGrid

func NewGrid(initRowsRaw []string) (*Grid, error)

func (*Grid) ActiveCount

func (g *Grid) ActiveCount() int

func (*Grid) AdaptMinMax

func (g *Grid) AdaptMinMax(p Pos)

func (*Grid) CalcNext

func (g *Grid) CalcNext()

func (*Grid) DoNext

func (g *Grid) DoNext()

func (*Grid) Dump

func (g *Grid) Dump()

func (*Grid) DumpCurrent

func (g *Grid) DumpCurrent()

func (*Grid) DumpZSlice

func (g *Grid) DumpZSlice(z int, w int)

type Pos

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

func (Pos) Neighbours

func (p Pos) Neighbours() []Pos

func (Pos) String

func (p Pos) String() string

Jump to

Keyboard shortcuts

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