Giter Club home page Giter Club logo

game-of-life's Introduction

Game of Life built with React and Typescript

Conway's Game of Life, also known simply as Life, is a zero-player cellular automaton game.

At each step, the following transitions occur:

  1. Any live cell with fewer than two live neighbors dies, as if by underpopulation.
  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.

The rules are applied indefinitely, creating new board states at every step or tick.

You can check it live on https://gameoflife.vftiago.com/ or https://gameoflife.infodump.xyz/

Running the project locally

To run the project, clone it, run npm i, and then run npm start. You should be able to see the game running on http://localhost:5174.

Potential points of improvement

The following features could potentially increase the app's usability at little development cost (quick wins), in no particular order:

  • Dynamically set up the initial board dimensions based on the browser window's inner height and width.
  • Allow users to click each individual Cell to change its state to dead or alive when the game is paused.
    • As a follow-up, allow users to clear the board (set all cells to dead).
  • Allow users to change the time interval between ticks up to a sensible limit.
  • Allow users to change cell size up to a sensible limit.

game-of-life's People

Contributors

vftiago avatar

Watchers

 avatar

game-of-life's Issues

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.