I always wanted to implement Conways Game of Life, and by using JavaFX and Scala this happens to be possible with just some 140 lines of code.
Background information for the idea can be read on the wikipedia, I'll quote the important stuff here:
The funny thing is that there exist some starting configurations which produce some stable, self repeating patterns.
Background information for the idea can be read on the wikipedia, I'll quote the important stuff here:
- Any live cell with fewer than two live neighbours dies, as if caused by under-population.
- Any live cell with two or three live neighbours lives on to the next generation.
- Any live cell with more than three live neighbours dies, as if by overcrowding.
- Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.
Here is the source:
No comments:
Post a Comment