Method: LifeCalculator#should_live
- Defined in:
- lib/life_game_viewer/model/life_calculator.rb
#should_live(model, row, col) ⇒ Object
Returns whether or not (as true or false) the specified cell should continue to live in the next generation.
89 90 91 92 93 |
# File 'lib/life_game_viewer/model/life_calculator.rb', line 89 def should_live(model, row, col) model.alive?(row, col) \ ? live_cell_should_continue_to_live(model, row, col) \ : dead_cell_should_become_alive(model, row, col) end |