Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yashsaini99/snakegame
A Snake game made with C++
https://github.com/yashsaini99/snakegame
Last synced: 12 days ago
JSON representation
A Snake game made with C++
- Host: GitHub
- URL: https://github.com/yashsaini99/snakegame
- Owner: YashSaini99
- Created: 2023-08-28T13:57:22.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-28T08:24:24.000Z (4 months ago)
- Last Synced: 2024-07-28T09:37:57.216Z (4 months ago)
- Language: C++
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Snake Game
This is a simple Snake game implemented in C++ that can be played in the terminal. The game includes basic functionalities such as snake movement and food generation.
## Features
- Classic Snake gameplay
- Playable in the terminal
- Simple and intuitive controls## Getting Started
### Prerequisites
To compile and run the game, you need to have a C++ compiler installed on your machine.
### Installation
1. Clone the repository:
```sh
git clone https://github.com/YashSaini99/SnakeGame.git
```2. Navigate to the project directory:
```sh
cd snake-game
```3. Compile the game:
```sh
g++ snake.cpp -o snake
```4. Run the game:
```sh
./snake
```## How to Play
- Use the arrow keys to control the snake's direction.
- Eat the food to grow longer.
- Avoid running into the walls or the snake's own body.
- The game ends when the snake crashes into itself or the wall.## Controls
- `w` - Move up
- `s` - Move down
- `a` - Move left
- `d` - Move right## Contributing
Contributions are welcome! If you have any ideas for improvements or encounter any issues, please feel free to open an issue or submit a pull request.