Read about Conway's Game of life if you still haven't. I came to know about this from Saurabh Santhosh, a senior of mine. And, IT IS AWESOME..!
Here is a basic 'game of life' program. As it is a zero-player game, my program reads the size of universe, the number of cells and their (x, y) position.
The given configuration ends up in an oscillator. I had to manually exit. But program stops when all we're left with is still life. And also, an infinite universe(unbounded environment) is not simulated in this code.
Here's the Github repo of my Life :P - https://github.com/jithusunny/Life