You are browsing as a guest. Sign up (or log in) to start making projects!

44m 7s logged

Game of Life rules

Implemented the rules of Game of Life:

  • Each cell is either “dead” (black) or “alive” (white)
  • If an alive cell has more than 3 alive neighbours it dies of crowding
  • If an alive cell has less than 2 alive neighbours it dies of loneliness
  • If a dead cell has exactly 3 alive neighbours it becomes alive

Each frame is then decided based on the state of the previous.
You can see some “glider” patterns emerging from the randomly generated soup!

0
5

Comments 0

No comments yet. Be the first!