IN101 project on Conway's Game of Life
|
Author: Victor Colomb (vic.c) ol@h otmai l.fr
See source code here.
Conway's game of life follows the following rules:
Neighbors are the eight surrounding cells (vertically, horizontally and diagonally).
We provide a naive implementation for the simulation universe using a string to store the universe cells (see detailed information here) as well as a linked list implementation featuring an option for the universe to be expandable (see detailed information here).
In the terminal:
make
make naive
make linkedlist
make compile-all
make naive-compile-all
make linkedlist-compile-all
Universes are loaded from text files formatted as follows:
where universe cells follow the convention .
for a dead cell and o
for a live one.
Here's an example for a 3x4
universe:
app-naive-loader
to load a universe from a source textfile and print it as is to the console, using the naive implementation.app-naive-conway
to load a universe from a source textfile and simulate the given amount of steps, using the naive implementation.app-list-loader
to load a universe from a source textfile and print it as is to the console, using the linked list implementation.app-list-conway
to load a universe from a source textfile and simulate the given amount of steps, using the linked list implementation.Use make run-<app_name> [ARGS=""]
to build and run an executable (make run-test-naive-conway
or make run app-list-conway ARGS="-i file.txt"
for example).
Use make valgrind-<app_name> [ARGS=""]
to build and run an executable under the valgrind
tool.
We provide a series of tests to verify that all the provided function work properly.
Use make launch-test
to execute them all.
See detailed information on the related page here.
See detailed information on the related page here.
app-naive-conway
and app-list-conway