class

IGOL::GameOfLife

Inherits Reference < Object

Represents a mutable GoL grid

Constants

OriginSquare = [{-1, 1}, {0, 1}, {1, 1}, {-1, 0}, {0, 0}, {1, 0}, {-1, -1}, {0, -1}, {1, -1}]

Constructors

new(population : Set(Point) = Set(Point).new)
Source

Class methods

random(max_size = 100, x_range = 1..10, y_range = 1..10)
Source

Instance methods

==(other : self)

Returns true if this reference is the same as other. Invokes same?.

[](idx)
Source
add(cells : Set(Point))
Source
copy(population = @population) : GameOfLife
Source
draw(x_range = -4..4, y_range = -4..4)
Source
evolve(iterations = 1)
Source
hash(hasher)

See Object#hash(hasher)

population
remove(cells : Set(Point))
Source
to_named_tuple
Source
to_s(io)
Source
to_tuple
Source

Macros

[]=(population_pattern, rhs)
Source