Skip to content

Commit

Permalink
Change survive again
Browse files Browse the repository at this point in the history
  • Loading branch information
ceebo committed Nov 4, 2015
1 parent 8067e38 commit d39fdca
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions survive.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,15 @@ main(int argc, char *argv[]) {
|| matchLifeList(&cells, &boundarycells, 0) != matchcells.ncells) {
fail++;
restored=0;
if (firstgen == 0) { firstgen = i; maxgen = i + 10; }
if (firstgen == 0) { firstgen = i; maxgen = i + restorefilter + 10; }
} else {
if (restored == 0 || i <= maxgen) {
prodcells = cells.ncells - matchcells.ncells;
copyLifeList(&cells, &outcells);
}

restored++;
if (restored>restorefilter) {
if (restored == restorefilter + 1 || i <= maxgen) {
prodcells = cells.ncells - matchcells.ncells;
copyLifeList(&cells, &outcells);
}

if (fail>damaged) damaged=fail;
fail = 0;
firstgen = 0;
Expand Down

0 comments on commit d39fdca

Please sign in to comment.