game-of-life-c

🌟 A terminal application to simulate the Conway's game of life cellular automaton 🌟

View on GitHub

Conway’s Game of Life Simulator

This was my submission for the Harvard CS50x final project.

Video Demo: https://youtu.be/KB4p_-KxPt4

This program is a terminal application made in C that simulates the Conway’s Game of Life Cellular automaton

Installation 📦

Build 🛠️

make

Installation (add to bin folder)

make install

Usage

Usage

What is a Cellular Automaton

Game of Life’s Rules

The rules of the Game of Life cellular automaton are very simple.

Every cell interacts with its eight neighbours, which are the cells that are horizontally, vertically and diagonally adjacent.

example1 example2

Defferent entities

An entity is a pattern of cells that have a certain behaviour

There are multiple types of entities for example :

oscillator example

still life example

Very complex behaviour

Here are two examples of very complex behaviours that have been discovered :

glider gun

Structure of the project

src/main.c

This file manages argument parsing, and is used for starting the simulation

src/utils.c

This file contains usefull fonctions such as sleep_ms, clear_terminal and more so that the main.c file is not too long

src/life.c

This file contains all the logic of the game of life

Uninstall

# 📂 game-of-life-c
make uninstall
# This will just delete /usr/bin/golc

final

If you have any problem, dont hesitate to open an issue.

contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.