dotnet / dotnet/samples

Conway's game of life: algorithm for animation does not consider state

Open
#4,486 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
3.7k
Forks
5.1k
Avg merge
9h 11m
Merged PRs (30d)
1

Description

## 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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.