Git Product home page Git Product logo

game-of-life's Introduction

Welcome to Game of Life!

The Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematician John Horton Conway in 1970. It is played on a 2D grid filled with cells.

If you are unfamiliar with this you can read below or click on this link.

Rules

  1. Any live cell with fewer than two live neighbours dies, as if by underpopulation.
  2. Any live cell with two or three live neighbours lives on to the next generation.
  3. Any live cell with more than three live neighbours dies, as if by overpopulation.
  4. Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.

How to play

To play this version you have to clone the repository in a folder of your choosing. After that open the solution file and run the project. Upon starting you have to type the name of the pattern you want to see.

Patterns

There are 3 common patterns know as:

  • Still lifes: These patterns do not change from one generation to the next. Common patterns are the Block, Beehive, Tub and many others.

  • Oscillators: After a finite number of generations these patterns return to their initial state. Popular ones are Blinker, Beacon and Toad. The listed ones have a period of 2 meaning that after two generations they return to the initial state.

  • Spaceships: Flying across the grid these patterns return to their initial configuration after a different number of ticks. Common spaceships are Glider, Lightweight spaceships, Middleweight spaceships and Heavyweight spaceships.

Preview

Here is a gif of the Toad pattern perfectly flopping on the screen.

Bonuses

When it comes to bonuses we have them all!

  • A brand new pattern : Glasses (made by me!)

  • Different game modes and altered set of rules - Coming soon!

  • Bonus 1: Zombies!
    Upon answering the prompt with "Yes" you enter the Zombies game mode. In this mode every dead cell has a 10% chance to respawn as a live one. Now dead generations can come to life again with a bit of luck!

game-of-life's People

Contributors

kirilangelov 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.