Git Product home page Git Product logo

game-of-life's Introduction

year creators framework

Game of Life

A zero-player, cellular automaton game.

Play in your terminal and configure custom settings to change how the app simulates L I F E.

Game of Life demonstration

Play

Build the project in Visual Studio.

In your terminal, navigate to the "net6.0" folder: cd game-of-life/Life/Life/bin/Debug/net6.0

shortcut

GIF is out-of-date, I've migrated the project from .NET 3.1 to .NET 6.0 !

Run: dotnet life.dll

Hit enter to run using default settings.

If you want to use custom settings, you'll need to type some options before you hit enter.

Settings may need to be followed by one or more parameters like so:

--argument param --argument param param

The app will tell you if you have entered arguments incorrectly and if parameters are out of bounds, invalid, or missing.

Custom Settings

--birth followed by integers greater or equal to zero like 3 and ranges between two positive integers like 1...9. You can use both a range along with single integers. This determines the number of neighbours a cell needs to be born.

--survival followed by integers greater or equal to zero like 1 or a range between two positive integers like 2...3. You can use both a range along with single integers. This determines the number of neighbours a cell needs to survive.

setting rules


--dimensions followed by row & column integers both 4...48 inclusive like 7 11. The size of the universe.

setting dimensions


--random followed by decimals 0...1 inclusive like 0.5. The probability of any cell to initially be born, making each universe random if no seed was specified (0.7 is 70%).

setting random


--max-update followed by integers 1...30 inclusive like 6. The number of generations per second, speeding up / slowing down the lifetime of the universe.

setting max-update


--generations followed by integers greater than zero like 11. The number of generations the life will simulate.

setting generations


--neighbour followed by type, order, and count centre. The type is the type of neighbourhood used, either moore or vonNeumann (case insensitive). The order is the size of the neighbourhood, integers 1...10 (inclusive) and less than half of the smallest dimension (out of rows/columns). Count centre is a boolean that will include the centre cell as a neighbour, either true or false. All together this could look like vonNeumann 6 false

setting neighbour


--seed followed by path/to/your/file.seed of the initial seed you want to use (relative or absolute paths). Seeds must be '.seed' files with grid values within the default dimensions (16x16) or dimensions specified by you. A seed will disable the random chance of a cell being born initially since the seed already determines which cells start alive. The largest value in the seed (e.g. 7,7) requires a universe of size 8x8. This is because rows & columns are 0-based. A seed directory path cannot have \ instead please change the directory to have only / instead. E.g. path/to/glider.seed NOT path\to\glider.seed

setting seed


--output followed by path/to/your/generated/file.seed to save the last generation of the universe (relative or absolute paths). The output file must be a '.seed' file, please create one so the program can write the last generation to it.


--periodic wraps the universe around as if there is no border around the grid.

setting periodic


--step will wait for you to press space to show each generation instead of automatically simulating. When the step mode is ON, it will disable the update rate as generations are not updating automatically anymore.


--ghost shows the ghosts of the past 3 generations, fading more and more as they get older.

setting ghost

Classes

classes

game-of-life's People

Contributors

johnnymadigan avatar

Watchers

 avatar

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.