Class: Conway::Rules::UnderPopulation
- Inherits:
-
Object
- Object
- Conway::Rules::UnderPopulation
- Includes:
- MemoizedCells, LiveCount
- Defined in:
- lib/conway/rules/under_population.rb
Instance Method Summary collapse
Methods included from MemoizedCells
Instance Method Details
#apply(cell, neighbors) ⇒ Object
9 10 11 12 |
# File 'lib/conway/rules/under_population.rb', line 9 def apply(cell, neighbors) count = live_count(neighbors) dead_cell if cell.alive? && less_than_two?(count) end |