staskorz / game-of-life

Game of Life

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Game of Life

How to run

  1. Clone: git clone https://github.com/staskorz/game-of-life

  2. Navigate to project folder: cd game-of-life

  3. Install dependencies: yarn

  4. Run tests: yarn test (in verbose mode: yarn test --verbose)

  5. Run (in dev mode - will restart on every code modification, terminate with "Ctrl+C"): yarn start

    with sample arguments: yarn start 3 3 2 3 "0 0 0 1 0 0 1 0 1"

  6. Run in normal mode: node src/index.js

    with sample arguments: node src/index.js 3 3 2 3 "0 0 0 1 0 0 1 0 1"

Arguments

  1. width - int - The width of the world
  2. height - int - The height of the world
  3. infect-after - int - The number of generations after which the infection stage will start
  4. max-generations - int - The maximum number of generations that can be created. Including all phases of the game
  5. seed - [] int - The initial state of the world

About

Game of Life


Languages

Language:JavaScript 100.0%