Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GameOfLife ¶
type GameOfLife struct {
// contains filtered or unexported fields
}
GameOfLife represents the game state. '*' represents a live cell and '.' represents a dead cell.
func NewGameOfLife ¶
func NewGameOfLife(board string) *GameOfLife
NewGameOfLife parses a starting board. The given board's lower left coordinate with be 0,0
func (*GameOfLife) Step ¶
func (gol *GameOfLife) Step()
Step executes a single step of the simulation.
func (*GameOfLife) String ¶
func (gol *GameOfLife) String() string
String returns the string representation of the board now.
Click to show internal directories.
Click to hide internal directories.