Course:CPSC312-2016-Project2-Game-of-Life

From UBC Wiki

Game of Life

Authors: Austin Rothwell & Torin O'Regan-Latarius

What is the problem?

We want to create a version of Conway's Game of Life (see https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life).

What is the something extra?

We are going to animate the game in the terminal console, so you can see your organism developing or dying. In addition, we want users to be able to change the rules of the game, to create different versions of the classic game. For example, instead of a dead cell becoming a live cell when it has 3 alive neighbours, a player could change this to 2 to see its effect.

What did we learn from doing this?

Overall, Haskell was useful for implementing a concise life-like cellular automaton. Using Haskell types it was simple to define the board, and using the IO type made it easy to show the board in terminal. However, using the terminal to print the board imposed a limitation on the size of the board. If the board was larger than 30x10 it would take too long for all the cells to print, making the frame by frame animation of the game less smooth. We think it could be better to use some type of game package that can refresh the whole game board at once, to allow for smooth animation of larger game boards. However, this was outside the scope of our project.

To further extend this game, we would like to add more features. We implemented the ability to choose the number of neighbours resulting in cell birth and death, but we would like to also implement the ability to choose whether the board wraps around and the board size, directly from the start function. In addition, it would also be interesting to add a stochastic element to our game, whereby random cells are born or killed during the game.