Skip to content

zf-ran/cconways

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

C Conway’s Game of Life

Or… CCGL.

This is the Conway’s Game of Life, a cellular automaton, coded in C.

This supports Windows and Unix-like (Linux and MacOS1).

Compiling

The following compiler command is going to place the executable on bin folder.

Linux

Requirements:

  • libncurses (Ubuntu/Debian).
  • ncurses-devel (Fedora/RHEL).
  • GCC/Clang.

Ensure the requirements are installed.

# Ubuntu/Debian
sudo apt install libncurses-dev
# Fedora/RHEL
sudo dnf install ncurses-devel

For compiling, you can use GCC or Clang. For GCC:

gcc main.c includes/*.c -lncurses -o bin/main

For Clang:

clang main.c includes/*.c -lncurses -o bin/main

Ensure the executable has permission to run:

chmod +x bin/main

macOS

Requirements:

  • ncurses.
  • GCC.

Ensure the requirements are installed.

brew install ncurses

To compile, use GCC:

gcc main.c includes/*.c -I/usr/local/opt/ncurses/include -L/usr/local/opt/ncurses/lib -lncurses -o bin/main

Windows

Requirements:

Compiling:

gcc main.c includes\*.c -o bin\main.exe

Usage

Linux and macOS

<bin> <height> <width> [<fullness>]
  • <bin> — Replace with your binary file.
    • On Linux/macOS the default is bin/main
    • On Windows the default is bin\main.exe
  • <height> <width> — Height and width of the board.
  • <fullness> (optional) — The fullness percentage of active cells (integer from 0 to 100).
    • 0 means empty.
    • 100 means full.

Footnotes

  1. MacOS not tested, tester needed!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages