Git Product home page Git Product logo

go-life's Introduction

go-life

Terminal based Conway's Game of Life. Implemented in Go.

demo

Features

  • Run on your terminal!
  • Insert pattern from presets
  • Color themes
  • Mouse editing

Install

Binary

Go to release page and download.

$ wget https://github.com/sachaos/go-life/releases/download/v0.4.0/go-life_darwin_amd64 -O /usr/local/bin/go-life
$ chmod +x /usr/local/bin/go-life

Manually Build

You need go version 1.11.

$ git clone https://github.com/sachaos/go-life.git
$ make install

How to use

Start

$ go-life

Set pattern & theme

$ go-life --theme Ocean --pattern glider-gun

Load pattern

Load from STDIN

$ curl http://www.conwaylife.com/patterns/glider.rle | go-life --file -

Load from file

$ go-life --theme Ocean --file ./glider.lif

Help

$ go-life --help

Keymap

SPC: stop
Enter: step
c: clear
r: random
h: hide this message & status
p: switch preset
t: switch theme
LeftClick: switch state
RightClick: insert preset

go-life's People

Contributors

dandias avatar dependabot[bot] avatar leander-elw avatar sachaos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

go-life's Issues

Not an issue, just a compliment :)

This is really cool. I didn't see this until after I had made my own game of life. Mine is super simple. Only does random starts. Your version is awesome. I'm fairly new to go, hope I get a grasp like you have.

Feature: make it never end

Add a command line option, such that when passed, the game will continue with another random seed after the pattern does not change after screen update. Perhaps the option could take delay to specify seconds after which new game would start with another random seed.

This will make it possible to use go-life as a "screensaver" just like people use the famous matrix-inspired screensavers.

So the start cmd does not work

  • followed the instructions on readme
  • it should work with go-life on the terminal, but have this instead:
    image

ps: i've used this before and worked just fine, dunno what changed / happened - cheers for the awesome lib tho, thx!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.