model

package
Version: v0.0.0-...-889be3d Latest Latest
Warning

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

Go to latest
Published: May 9, 2021 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 GameBoard

type GameBoard [][]byte

type GameOfLife

type GameOfLife struct {
	component.BaseGame

	BoardWidth  int
	BoardHeight int

	Cycle int
	// contains filtered or unexported fields
}
var Game *GameOfLife

func NewGameOfLife

func NewGameOfLife(gameWidth, gameHeight int32, livingRatio float32) *GameOfLife

func (GameOfLife) GetCurrentBoardState

func (g GameOfLife) GetCurrentBoardState(x, y int) byte

func (*GameOfLife) Reset

func (g *GameOfLife) Reset() error

func (*GameOfLife) SetTargetBoardState

func (g *GameOfLife) SetTargetBoardState(x, y int, newState byte)

func (*GameOfLife) SwitchBoards

func (g *GameOfLife) SwitchBoards()

func (*GameOfLife) Update

func (g *GameOfLife) Update() error

Source Files

Jump to

Keyboard shortcuts

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