private void applyRule4(Grid.Cell presentCell, Grid.Cell futureCell, int livingNeighborsCount) { if (presentCell.isDead() && livingNeighborsCount == 3) { log("...lives in next generation :-) (reproduction)"); futureCell.reproduce(); } }
private void applyRule2(Grid.Cell presentCell, Grid.Cell futureCell, int livingNeighborsCount) { if (presentCell.isAlive() && (livingNeighborsCount == 2 || livingNeighborsCount == 3)) { log("...lives in next generation :-)"); futureCell.reproduce(); } }