https://github.com/buckley-w-david/conwaygo
Conway's Game of Life in Golang
https://github.com/buckley-w-david/conwaygo
Last synced: about 2 months ago
JSON representation
Conway's Game of Life in Golang
- Host: GitHub
- URL: https://github.com/buckley-w-david/conwaygo
- Owner: buckley-w-david
- License: mit
- Created: 2018-11-12T07:16:14.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-11-15T21:50:43.000Z (almost 7 years ago)
- Last Synced: 2025-03-22T22:18:08.558Z (7 months ago)
- Language: Go
- Homepage:
- Size: 13.2 MB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# conwaygo
Conway's Game of Life implementation
## Usage
```bash
$ go build cmd/life/life.go
$ ./life -h
Usage of ./life:
-debug
Display in debug mode
-delay float
Seconds between updates (default 0.2)
```When the binary in run, you will be presented with a blank screen.
Click on the terminal where you wish the seed live cells. You can do this at anytime, even after you have started the simulation.### Keybindings
| Key | Description |
| ----------- | ------------------------------------ |
| `space` | Start and stop the simulation |
| `Page Up` | Increase the speed of the simulation |
| `Page Down` | Decrease the spped of the simulation |
| `ctrl`+`d` | Enable debug mode. |
| arrow keys | Move the viewport |In debug mode instead of displaying live cells, each tile will show the number living cells surrounding it.
## Example
*Note* This gif is a little out of date, now that the code is split up into a `pkg` and `cmd` directory, build the project by running `go build cmd/life/life.go`