cells

package module
v0.0.0-...-219f90b Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: MIT Imports: 6 Imported by: 0

README

cells

A Conway's Game of Life

Patterns

https://conwaylife.com/patterns/

License

Licensed under the MIT License. See LICENSE for the full license text.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy

func Copy(dist, src Maps)

func WithBound

func WithBound(b bool) option

Types

type Cells

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

func NewCells

func NewCells(maps Maps, opts ...option) *Cells

func (*Cells) Maps

func (c *Cells) Maps() Maps

func (*Cells) Next

func (c *Cells) Next() bool

func (*Cells) String

func (c *Cells) String() string

type Maps

type Maps interface {
	Get(x, y int) bool
	Set(x, y int, s bool)
	String() string
	Clone() Maps
	Width() int
	Height() int
}

func NewMapsBits

func NewMapsBits(width, height int) Maps

func NewMapsChars

func NewMapsChars(alive, empty byte, width, height int) Maps

func NewMapsCharsWithData

func NewMapsCharsWithData(alive, empty byte, data [][]byte) Maps

func NewMapsWithRLE

func NewMapsWithRLE(data [][]byte) (Maps, error)

Directories

Path Synopsis
cmd
cells command

Jump to

Keyboard shortcuts

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