command
module
Version:
v0.0.0-...-aabedf8
Opens a new window with list of versions in this module.
Published: Oct 6, 2022
License: MIT
Opens a new window with license information.
Imports: 10
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
Snake Game In Go
Contents
Structure
-
main.go
Entry point of the game
-
objects
board, snake, food game objects
-
config
Config objects and a toml config parsing function
-
color
Helper package for adding color to the terminal
-
routines
Goroutines to capture user input and system calls
Installation And Running
-
Install the Go language with version found in go.mod
-
Clone the repository:
git clone github.com/Nicolas1st/goSnake
- Download the dependencies:
go mod download
- Go to the repository directory and run:
go run main.go
Controls
-
Movement
w - up
a - left
s - down
d - right
-
To quit press q
Configuration
-
Edit config.toml
-
Set the environment variable to the name of the file above,
using the following command:
On Linux:
export gosnake_config_file=config.toml
On Windows:
set gosnake_config_file=config.toml
- Run the game:
go run main.go
Documentation
¶
There is no documentation for this package.
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.