Skip to content

Instantly share code, notes, and snippets.

@sranso
Created December 6, 2013 00:16
Show Gist options
  • Select an option

  • Save sranso/7816548 to your computer and use it in GitHub Desktop.

Select an option

Save sranso/7816548 to your computer and use it in GitHub Desktop.
class World
attr_reader :board
def initialize
create_world
end
def create_world
@board = []
30.times do |y|
rows = []
30.times do |x|
rows << Cell.new(y, x)
end
@board << rows
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment