A Go implementation of Conway's Game of Life featuring a terminal-based user interface, configuration through sample files, and clear modular code structure.
Conway's Game of Life is a cellular automaton simulation where cells evolve based on their neighbors. It's not just a simulation; it provides interesting emergent behaviors.
Ensure that Go is installed:
go versionDownload dependencies:
go mod downloadRun the application from the root directory:
go run main.go [sample_name]If no sample name is provided, the program will present an interactive menu to choose from available samples. Available samples are listed in the samples/ directory.
Once the simulation is running, use the following keys:
- Arrow Keys: Move the viewport (Up/Down/Left/Right)
- I/K/J/L: Move the viewport by larger increments (10 spaces)
- Space: Pause/Resume the simulation
- H: Display help
- Q or Ctrl-C: Quit the program
Previous versions had an issue where after running the program once, subsequent runs would display control characters literally (e.g., ^M for Enter, ^C for Ctrl-C) instead of processing them normally. This has been resolved through improved terminal state management and cleanup procedures.
For technical details about this fix, see Terminal-Issues.md.
Contributions are welcome! Submit your suggestions through GitHub issues or pull requests.
See the LICENSE.md file for details.