Game of life is a zero-player game - the grid evolves from given initial state according to the Conway's algorithm.
In order to start the game there is provided a file with initial configuration - config.txt, which syntax is as follows:
fist line configures whether to use console or QT version of game:
[CONSOLE | QT]
second line consists of 2 numbers - number of pixels respectively widthways and lengthways of the grid:
WIDTH LENGTH
third line consists of the name of file with initial state - as default there is a initial state provided in common\initial_state.txt
fourth line consists of period of rendering new state given in milliseconds
all lines are the list of live cells on digit in format X Y
,
X in [0,1,2,...,WIDTH-1]
, Y in [0,1,2,...,LENGTH-1]
- Make sure You have QT 6 installed on your PC
- Go to the the directory where you have cloned the project
cd <some_path>/GameOfLife
- Set a path to your qt cmake
cmake DCMAKE_PREFIX_PATH="path/to/Qt/lib/cmake"
on windowscmake DCMAKE_PREFIX_PATH=/usr/include/{host}/qt{version}/
on Ubuntu
mkdir -p cmake-build && cd cmake-build
cmake .. -G"Unix Makefiles"
make