samples
samples copied to clipboard
Conway's game of life: algorithm for animation does not consider state
Conway's game of life: algorithm for animation does not consider state
The algorithm mutates the state of the field while calculating the neighbors. This is incorrect. The previous state of the cells must be treated as immutable. As a result, the animation is wrong. For example, the 4x4 square should completely disappear after 4 cycles.
The animation needs to work on a second instance of the Animation object.
Issue metadata
- Issue type: sample-update