- Any live cell with fewer than two live neighbours dies, as if caused by underpopulation.
- Any live cell with two or three live neighbours lives on to the next generation.
- Any live cell with more than three live neighbours dies, as if by overpopulation.
- Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.
This version in Go by DSM by strict TDD, October 2017. This hasn't been tested on Windows
and this version will certainly crash because of the clear command in the clearScreen function. Change that to cls
for Windows.
- Move the
GameOfLife/directory to your$GOPATH/src cdinto theGameOfLife/directorygo build -o GameOfLife(or-o GameOfLife.exeon Windows)GameOfLife(orGameOfLife.exeon Windows)
- created
src/andbin/at your$GOPATH - set your
$GOSRCPATH - added your
$GOBINPATHto your$PATH
cd $GOSRCPATHgo install GameOfLifeGameOfLife(orGameOfLife.exeon Windows)
./install.shfrom the GoGameOfLife directory (may require asudo chmod +x install.shfirst)GameOfLife