Method: Conway::Rules#apply
- Defined in:
- lib/conway/rules.rb
#apply(cell, neighbors) ⇒ Object
17 18 19 20 21 22 |
# File 'lib/conway/rules.rb', line 17 def apply(cell, neighbors) rules.map do |rule| next_cell = rule.apply(cell, neighbors) break next_cell if next_cell end end |