GithubHelp home page GithubHelp logo

conway_s_game_of_life's Introduction

Conway's Game of Life

Game Rule

according to wiki, the game is a zero-player game, which start from its initial state and evaluate to its death or infinitely.

the game is on an infinite, two-dimensional orthogonal grid of square cells, but here we are running it on a finite grid. A cell is in one of two possible states, alive or dead. Every cell interacts with its eight neighbours, which are the cells that are horizontally, vertically, or diagonally adjacent. At each step in time, the following transitions occur:

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

Project Layout

.
├── Cargo.lock                  // depencies lock
├── Cargo.toml                  // project config
├── README.md
├── src                         // source diretory, source code goes here
│   ├── lib.rs                  // the game its self, as a library, 
│   └── main.rs                 // the binary to load the game from a configuration file
└── tests
    ├── error_state.txt
    ├── initial_state.txt
    └── integration-tests.rs    // integration tests go here (unit tests go in each file they're testing)

Get Started

make sure your git and rustup is setup correctly

git clone https://github.com/jonirrings/conway_s_game_of_life.git
cd conway_s_game_of_life
cargo run --release

conway_s_game_of_life's People

Contributors

jonirrings avatar

Watchers

James Cloos 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.