world

package
v0.0.0-...-899c67c Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2020 License: Apache-2.0 Imports: 1 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckInformer

type CheckInformer interface {
	Checker
	Informer
}

type Checker

type Checker interface {
	Check(Location) lifeform.State // Checks life form at the location for neighbors and sets/returns next state
	CheckAll()
}

type Explorer

type Explorer interface {
	Informer
	Checker
	Maker
	Processor
}

type Informer

type Informer interface {
	Get(Location) lifeform.Shaper // get life form from the location
	Size() (int, int)             // returns size of the world
}

type Location

type Location struct {
	Row int
	Col int
}

type Maker

type Maker interface {
	SetLife(lifeform.Shaper, Location) // set a life form to the location in the world
}

type Processor

type Processor interface {
	Update(Location) // runs against all cells in the world and updates current state to the next
	UpdateAll()
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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