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