First commit of Conway's Game of life js.
Initial commit
Merge remote-tracking branch 'origin/master'
Commented test with visual representations of the world/grid/board.
Backtracked on test which forces big steps.
Tests for a row and column of 3 live cells. Code evolving from returning
constant coordinates to returning an expression representing the
'middle' one.
Tests for row and column with four live cells in a line. Pattern
starting to emerge in production code.
Test for a row with 5 live cells in a line.
Created and tested a helper function for making a row of live cells.
Simplified code to a one liner which returns an array of live cell
coordinates after removing the first and last elements.
Diagonal 3, middle survives.
Massive step to make 2x2 block pass.
Renamed some tests and functions for clarity and consistency.
Changed the scope of certain functions to make the public interface
clearer. Not sure if this the best way to do private methods in
Javascript.
Tested 2x2 R-shape becomes 2x2 block.
Corrected test cases where row is longer 3 live cells, the adjacent row
should have become alive.
Removed the 5 cell row test because it does not force the program to
exhibit new behaviour.
Removed the, now redundant, helper method for making coordinates for a
long row.
Extracted isSurvivor and isBorn predicates.
Renamed method to getLiveNeighbour count to clarify that it's a query
method, not a command.
Tested a 2 tick oscillating pattern called a Blinker.
Not sure how it's working because the liveCellCoordinates is not
updated!??
Fixed the mystery of why the blinker test wasn't failing (incorrectly
declared/scoped liveCellCoordinates variables in test case).
Again, correct scoping of functions was needed to make the test pass.
Added the Game class with functions that represent the players
interactions with the game. In the simplest form of the game, the player
can sow a seed of live cells and then ask the world to 'tick'. That's
it!
Added a basic UI which calls the API and convenience functions of the
Game script.