marijnh/Eloquent-JavaScript

Ch.18 - Conway's game of life solution

Closed this issue · 1 comments

If I am not mistaken, the exercise solution doesn't exactly follow the exercise's requirements:

  • It doesn't check if the current cell is alive or not.
  • The second requirement says: "Any live cell with two or three live neighbors lives on to the next generation." The solution checks for two neighbors, and instead of making the cell live on, it sets its state to whatever it was in the previous generation.

On closer inspection I see that I was mistaken!