Conway's Game of Life

Using the allegro library and C++, I created a world given John Conway’s rules of life. There are four rules:

  • A living cell with fewer then two adjacent cells would die as if it were lonely
  • A living cell with more then three adjacent cells would also die as if it were overpopulation
  • A living cell with two or three adjacent cells would live to the next generation
  • A dead cell with exactly three adjacent living cells will come back to life

The world has basic features such as play, pause, frame by frame, fast forward, and slow motion. You can also remove the grid as well.

My Implementations

  • Incorperated Conway's cellular automation rules
  • Created a finite state system which allows the user to pause and resume while still draw on the screen
  • Used a tile design and implemented mouse input to correspond with the correct tile

Screenshots

screen1 screen2 screen3 screen4 screen5