Skip to content

Commit

Permalink
Adding FlxGameOfLife Demo (#265)
Browse files Browse the repository at this point in the history
  • Loading branch information
SeiferTim authored Apr 8, 2024
1 parent 50bc1fa commit a7e05f1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Binary file added content/_static/images/demos/FlxGameOfLife.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions content/demos/FlxGameOfLife.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: "FlxGameOfLife"
layout: demo
source: "Other/FlxGameOfLife"
---
This is a demonstration of [Conway's Game of Life](https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life) recreated in HaxeFlixel.

Every 'step' in the simulation, every cell in the grid is checked, and the following rules are applied to the next generation:
1. Any live cell with fewer than two live neighbors dies, as if by underpopulation.
1. Any live cell with two or three live neighbors lives on to the next generation.
1. Any live cell with more than three live neighbors dies, as if by overpopulation.
1. Any dead cell with exactly three live neighbors becomes a live cell, as if by reproduction.

0 comments on commit a7e05f1

Please sign in to comment.