Browse Source

fixed amount of iterations because of endless loops on the ls-borg

feature/2015
Christian Kroll 13 years ago
parent
commit
a3f7e211a0
  1. 4
      animations/gameoflife.c

4
animations/gameoflife.c

@ -300,7 +300,7 @@ void gameoflife() {
/* loop detection */ /* loop detection */
if (!pfcmp(pf1, pf2)) { if (!pfcmp(pf1, pf2)) {
insertglider(pf1); insertglider(pf1);
cycle = 1; // cycle = 1;
} }
if (pfempty(pf1)) { if (pfempty(pf1)) {
/* kill game */ /* kill game */
@ -311,7 +311,7 @@ void gameoflife() {
for (i = 0; i < LOOP_DETECT_BUFFER_SIZE; ++i) { for (i = 0; i < LOOP_DETECT_BUFFER_SIZE; ++i) {
if (!pfcmp(pf1, ldbuf[i])) { if (!pfcmp(pf1, ldbuf[i])) {
insertglider(pf1); insertglider(pf1);
cycle = 1; // cycle = 1;
} }
} }
pfcopy(ldbuf[ldbuf_idx], pf1); pfcopy(ldbuf[ldbuf_idx], pf1);

Loading…
Cancel
Save