class Cell

Attributes

index[RW]
kind[RW]
state[RW]

Public Class Methods

new(index=0) click to toggle source
# File lib/cell.rb, line 4
def initialize(index=0)
  @state = '[▓]'
  @index = index
  @kind =  ''
end

Public Instance Methods

die() click to toggle source
# File lib/cell.rb, line 10
def die
  @state = '[▓]'
end
is_alive?() click to toggle source
# File lib/cell.rb, line 18
def is_alive?
  return true if @state == '[▒]'
  return false if @state != '[▒]'
end
live() click to toggle source
# File lib/cell.rb, line 14
def live
  @state = '[▒]'
end