- 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
cd
into theGameOfLife/
directorygo build -o GameOfLife
(or-o GameOfLife.exe
on Windows)GameOfLife
(orGameOfLife.exe
on Windows)
- created
src/
andbin/
at your$GOPATH
- set your
$GOSRCPATH
- added your
$GOBINPATH
to your$PATH
cd $GOSRCPATH
go install GameOfLife
GameOfLife
(orGameOfLife.exe
on Windows)
./install.sh
from the GoGameOfLife directory (may require asudo chmod +x install.sh
first)GameOfLife