

To make it more of a challenge I also decided to implement an "sparse" method of recording the game board, this means that instead of the typical 2d array representing the whole board, I will only record the cells which are alive. If an alive cell has 2 or 3 alive neighbors, it continues to live.If an empty block has exactly 3 contiguous alive neighbors, a new cell will be born in that spot.If a cell has more than 3 neighbors, it will die of overpopulation.If a cell has less than 2 neighbors, meaning contiguous alive cells, the cell will die of loneliness.The game consists of a grid of n size, and within each block of the grid a cell could either be dead or alive according to these rules:
#Coding conways game of life sfml code
Having already programed in Java, C# and of course BASIC, I thought it would be a great idea to learn Python since I have great interest in data science and machine learning, and those two topics seem to have an avid community within Python coders.įor one of my starter quick programming tasks, I decided to code Conway's Game of Life, a very simple cellular automata that basically plays itself. It had always been a part of my life since my early years when I learned to program a Tandy Color Computer at the age of 8, the good old days. I am lately trying to take on coding again.
