/gol-app

Game of Life App

Primary LanguageHTML

Game of Life

Author:

Rules

  • Assume a fixed size board, eg 80 columns by 20 rows
  • To start the game, randomly set each cell on the board either ON or OFF
  • Print the status of the board to the screen
  • Enter an infinite loop:
  • Wait half a second
  • Produce a new "tick" of the board
  • Print the status of the board to the screen
  • The wikipedia article linked above describes the rules for each "tick":

Dependencies

  • node v8.8.0
  • npm v5.4.2
  • yarn v1.3.2

Install and Running

Development

  1. npm install
  2. npm start
  3. navigate to http://localhost:3000 in your browser of choice.
  4. click the Start button.

Tests

  1. npm test
  2. in your terminal Press a to run all tests.

Languages and libraries

  • JAVASCRIPT (ES6)
  • CSS3 (GRID LAYOUT, FLEXBOX)
  • HTML5
  • RAMDA
  • EXPRESS JS

To improve:

  • [done] Serve app on ExpressJS to run index on Localhost.
  • [done] Add Game instructions.
  • [todo] Add babel for es6 imports.
  • [todo] Use JS prototype approach to create a Cell element.
  • [todo] Add a Test layer (eg chai)
  • [todo] Customize grid to work with any rows/cols number.
  • [doing] Separation of concerns on functions (create utility functions) for better maintainability.
  • [doing] Improve code using a more declarative approach on coding.
  • [doing] Improve documentation on functions input/output.