Board

package
v0.0.0-...-8dffc68 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Board

type Board struct {
	Width  int
	Height int
	// contains filtered or unexported fields
}

func FromImage

func FromImage(image *image.Gray) (*Board, error)

func New

func New(width int, height int) Board

func (*Board) Equals

func (a *Board) Equals(b *Board) bool

func (*Board) GetCell

func (board *Board) GetCell(x int, y int) (*cell.Cell, error)

func (*Board) IsAlive

func (board *Board) IsAlive(x int, y int) (bool, error)

func (*Board) Next

func (board *Board) Next() (*Board, error)

func (*Board) SetCell

func (board *Board) SetCell(cell *cell.Cell)

func (*Board) ToImage

func (board *Board) ToImage() (*image.Gray, error)

func (*Board) WillSurvive

func (board *Board) WillSurvive(x int, y int) (bool, error)

Jump to

Keyboard shortcuts

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