Esempio n. 1
0
 private void applyRule4(Grid.Cell presentCell, Grid.Cell futureCell, int livingNeighborsCount) {
   if (presentCell.isDead() && livingNeighborsCount == 3) {
     log("...lives in next generation :-) (reproduction)");
     futureCell.reproduce();
   }
 }
Esempio n. 2
0
 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();
   }
 }