lib/game_of_life/earth.rb
# GameOfLife::Cell is a grid element where
# GameOfLife::Earth is a grid
# This class doesn't hold any logic related to
# cell mutation rules
:Cell is a grid element where
GameOfLife::Earth is a grid
This class doesn't hold any logic related to
cell mutation rules
: Cell is a grid element where GameOfLife :: Earth is a grid This class doesn ' t hold any logic related to cell mutation rules
def log
      grid = "Generation #{@generation}"
      @cells.transpose.each do |row|
        grid += "\n"
        grid += row.map(&:bool_to_num).join(' | ')
      end
      grid += "\n"
      grid
    end
def log grid = "Generation #{@generation}" @cells . transpose . each do | row | grid += "\n" grid += row . map ( & :bool_to_num ) . join ( ' | ' ) end grid += "\n" grid end
GameOfLife::Cell is a grid element where
GameOfLife::Earth is a grid
This class doesn't hold any logic related to
cell mutation rules
GameOfLife :: Cell is a grid element where GameOfLife :: Earth is a grid This class doesn ' t hold any logic related to cell mutation rules