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)
Class methods
random(max_size = 100, x_range = 1..10, y_range = 1..10)
Instance methods
==(other : self)
Returns true if this reference is the same as other. Invokes same?.
[](idx)
add(cells : Set(Point))
copy(population = @population) : GameOfLife
draw(x_range = -4..4, y_range = -4..4)
evolve(iterations = 1)
hash(hasher)
See Object#hash(hasher)
population
remove(cells : Set(Point))
to_named_tuple
to_s(io)
to_tuple
Macros
[]=(population_pattern, rhs)