This is a simple implementation of the classic Snake game in Go. The game is played in the terminal and uses keyboard input to control the snake's direction.
How to Play
Use the arrow keys to control the direction of the snake.
The snake will continue to move in its current direction even if no key is pressed.
Eat the food (represented by 'X') to grow the snake and increase your score.
Avoid running into the walls or the snake's own body.
Controls
Up Arrow - Move up
Down Arrow - Move down
Left Arrow - Move left
Right Arrow - Move right
Esc or q - Quit the game
Installation
Make sure you have Go installed on your machine. You can download it from the official Go website.
Clone this repository or download the source code.
git clone https://github.com/yourusername/snake-game-go.git
cd snake-game-go
Build the game.
go build -o snake
Run the game.
./snake
License
This project is licensed under the MIT License - see the LICENSE file for details.