Coder Social home page Coder Social logo

chrisjagoda / gameoflife-colors Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 4.52 MB

An implementation of Conway's Game of Life with a colorful twist.

License: MIT License

HTML 2.74% TypeScript 96.77% CSS 0.49%
conways-game-of-life procedural-generation typescript nodejs

gameoflife-colors's Introduction

Conway's Game of Life

An implementation of Conway's Game of Life with a twist involving phenotypes in the form of color.

Color are randomly assigned to each living cell on game initialization and passed down to the next generation from two parents picked randomly from the living neighbors of each cell with an equal chance for the child cell to posess either parents' color.

Dark/Light modes and switching cell colors on and off are included in the example.

An optional parameter, evolve, is also supported which increases reproduction of the cells creating different patterns.

Directions to Run

Install Browserify

npm install -g browserify

Fetch dependencies

npm install

Compile .ts files

Either enter the following command

node node_modules/typescript/bin/tsc.js

or use the tsc script from our package.json with

npm run tsc

Run Browserify

Either enter the following command

browserify src/app.js -o bundle.js -s app

or use the browserify script from our package.json with

npm run browserify

Start http-server

Either enter the following command

node node_modules/http-server/bin/http-server -o

or use the listen script from our package.json with

npm run listen

By default http-server listens on port 8080. If this port is taken, use '-p ####' to specify a free port, where #### is the available port.

Shortcut for running all steps in a batch

npm run all

gameoflife-colors's People

Contributors

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