Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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++

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.