Skip to content

Instantly share code, notes, and snippets.

View tylerdooling's full-sized avatar

Tyler Dooling tylerdooling

View GitHub Profile
@tylerdooling
tylerdooling / eastward_ho.rb
Last active August 29, 2015 14:09
Eastward HO!
class Person
attr_reader :address
def display_address(template = Template.new)
address.display(template)
self
end
end
class Address
@tylerdooling
tylerdooling / gol.rb
Created October 9, 2012 20:22
Game of Life
# The Game of Life
#
# Rules
# Any live cell with fewer than two live neighbors dies, as if caused by under-population.
# Any live cell with two or three live neighbors lives on to the next generation.
# Any live cell with more than three live neighbors dies, as if by overcrowding.
# Any dead cell with exactly three live neighbors becomes a live cell, as if by reproduction.
# Example usage
# Game.new(150,50).randomize.run 1000