gabe565 / cli-of-life

Play Conway's Game of Life in your terminal

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CLI Of Life

GitHub release (latest by date) Build Go Report Card

Play Conway's Game of Life in your terminal!

cli-of-life demo

Installation

Docker

Click to expand

A Docker image is available at ghcr.io/gabe565/cli-of-life

sudo docker run --rm -it ghcr.io/gabe565/cli-of-life

Homebrew (macOS, Linux)

Click to expand

Install cli-of-life from gabe565/homebrew-tap:

brew install gabe565/tap/cli-of-life

APT (Ubuntu, Debian)

Click to expand
  1. If you don't have it already, install the ca-certificates package

    sudo apt install ca-certificates
  2. Add gabe565 apt repository

    echo 'deb [trusted=yes] https://apt.gabe565.com /' | sudo tee /etc/apt/sources.list.d/gabe565.list
    
  3. Update apt repositories

    sudo apt update
  4. Install cli-of-life

    sudo apt install cli-of-life

RPM (CentOS, RHEL)

Click to expand
  1. If you don't have it already, install the ca-certificates package

    sudo dnf install ca-certificates
  2. Add gabe565 rpm repository to /etc/yum.repos.d/gabe565.repo

    [gabe565]
    name=gabe565
    baseurl=https://rpm.gabe565.com
    enabled=1
    gpgcheck=0
  3. Install cli-of-life

    sudo dnf install cli-of-life

AUR (Arch Linux)

Click to expand

Install cli-of-life-bin with your AUR helper of choice.

Manual Installation

Click to expand

Download and run the latest release binary for your system and architecture.

Usage

Run cli-of-life in a terminal to play.

By default, the grid will be empty, but rle/plaintext files can be loaded with cli-of-life FILE.rle or cli-of-life https://...

For full command-line reference, see docs.

Examples

$ cli-of-life https://conwaylife.com/patterns/gosperglidergun.rle
$ cli-of-life https://conwaylife.com/patterns/3blocktwinbeesshuttle.rle
$ cli-of-life https://conwaylife.com/patterns/breeder1.rle
$ cli-of-life https://conwaylife.com/patterns/replicator.rle

See the LifeWiki for pattern files.

Keybinds

Key Description
mouse Place cells
space Play/pause
m Toggle between modes: smart, place, erase
wasd Move the game board
-/+ Zoom
</> Change playback speed
t Tick
r Reset
q Quit

References

About

Play Conway's Game of Life in your terminal

License:Apache License 2.0


Languages

Language:Go 98.7%Language:Dockerfile 1.3%