Skip to content

kbHoward2/GameOfLife

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Game Of Life

A simple recreation of Conway's Game of Life using C++ and SFML.

Alt text

Features

  • User input or Pseudorandom board generation, and thresholds.
  • Speed adjustment.
  • Pause/Unpause.
  • Randomized Colors.

Installation Dependencies

Debian / Ubuntu / Linux Mint

apt-get install g++ cmake make git libsfml-dev

Cloning the Repository & Compiling

Enter the following in a commandline:

git clone https://github.com/kbHoward2/GameOfLife.git

cd GameOfLife

mkdir build

cd build

cmake ..

make

Execution (Linux)

Type the following into a commandline to execute a pseudorandom board: ./GameOfLife

Additionally, it's also possible to generate the board with a seed, by specifying a floating point threshold value (0.0, 1.0), then a seed floating point value. The command below generates an board with the threshold value of 40%, and a seed of 11127.

./GameOfLife 0.40 11127

Settings

Run the program once to generate the config.txt file. Here you can make changes to the window width, height, seed, and the threshold of cells.

Controls

[Mouse Left] - Add/Delete Cell.

[Up Arrow] - Speed up generation (Tap or Hold).

[Down Arrow] - Slow down generation ( Tap or Hold).

[Spacebar] - Pause/Unpause.

[N] - New Board & Color Generation.

[G] - Toggle Grid.

[C] - Clear Screen.

Planned Features

  • Refactor application loop.
  • Pause/Unpause & reset board.
  • Accelerate/Decelerate tick rate.
  • Colors.
  • Left click adds/kills cells.
  • Implement Grid.
  • Implement blank boards for user input.
  • Text Configuration File.
  • Windows Build.
  • Infinte Grid.
  • Zoom.
  • Loop Mode.

Alt text