class GameOfLifeGto::Cell

Attributes

id[RW]

Public Class Methods

new(id) click to toggle source
# File lib/game_of_life_gto.rb, line 32
def initialize(id)
  @id = id
end

Public Instance Methods

dies() click to toggle source
# File lib/game_of_life_gto.rb, line 43
def dies
  @id = 0
end
is_alive?() click to toggle source
# File lib/game_of_life_gto.rb, line 36
def is_alive?
  if @id != 0
    return true
  end
  return false
end
resuscitates() click to toggle source
# File lib/game_of_life_gto.rb, line 47
def resuscitates
  @id = 1
end