SweetMind

Game of Life

So can you win the game of life? Well, what a tricky question!

Actually if you think you can, then you already have 🙂 

But if you don’t think you can, remember that winning is not always the goal. 

Enjoying the processes and the little mundane things can worth more than most beautiful trophies and medals in the world.

But back to the Conway’s Game of Life, a cellular automaton devised by the British mathematician John Horton Conway in 1970.

 

I was in the first semester of my Computer Science major study when I learned about this fascinating theory. A set of very simple rules turned out to be a magnificent work of art! It blew my mind what amazing and great things can be achieved by some lines of simple codes.

Without further ado, I present our version of the Conway’s Game of Life!

The Game of Life

HOW TO PLAY:

1. Either click on the “Random” button, or click each cell you want to be alive

2. Click “Start” to see them live as an environment

3. Click “Clear” if you want to clear all living cells 

Rules:

1. Any live cell with fewer than two live neighbors dies, as if caused by under-population.

2. Any live cell with two or three live neighbors lives on to the next generation.

3. Any live cell with more than three live neighbors dies, as if by over-population.

4. Any dead cell with exactly three live neighbors becomes a live cell, as if by reproduction.