Code Monkey home page Code Monkey logo

conway-s-game-of-life's Introduction

Conway's Game of Life

Evolution Rules

  • Birth: Any dead cell with exactly three live neighbours becomes a live cell.
  • Survival: Any live cell with two or three live neighbours lives in the next generation.
  • Death by loneliness: Any live cell with fewer than two live neighbours dies, as in under-population.
  • Death by overcrowding: Any live cell with more than three live neighbours dies, as in over-population.

Details

  • Particle placement (Q, W, E, R): Particles are placed (key Q, W, E, R) into the simulation area based on the center of the particle using direction keys (right, left, up, down).

  • Particle rotation (1, 2, 4): Key 1, 2, 4 can be used to rotate a specific particle (particle Q, W, R) 90 degrees in clockwise direction.

  • Cell deletion (3): Key 3 is used to delete a single cell where cursor is on.

  • Clear screen (0): Key 0 is used to clear simulation area.

  • Generate new random particle (T): User can generate new particle-R using key T.

  • Generate new random particle and place randomly (Y): User can generate new particle-R and place randomly by using key Y.

  • Generate next step (space): When user presses space key, the next iteration of the simulation is calculated and printed.

conway-s-game-of-life's People

Contributors

glorkpixels avatar

Watchers

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