We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0f91422 + 159ee78 commit 9818880Copy full SHA for 9818880
content/07_ca.html
@@ -583,10 +583,9 @@ <h3 id="the-implementation">The Implementation</h3>
583
// Correct by subtracting the cell state.
584
neighborSum -= board[i][j];
585
586
- //{!2} The rules of life!
+ // The rules of life!
587
if (board[i][j] === 1 && neighborSum < 2) next[i][j] = 0;
588
else if (board[i][j] === 1 && neighborSum > 3) next[i][j] = 0;
589
- //{.continue}
590
else if (board[i][j] === 0 && neighborSum === 3) next[i][j] = 1;
591
else next[i][j] = board[i][j];
592
}
0 commit comments