Skip to content

Commit 8b3eac5

Browse files
Added README.md file
1 parent 10361b3 commit 8b3eac5

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

Hungry_Serpent/readme.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Hungry Serpent Game
2+
3+
Welcome to the Snake Game implemented in C++! This classic arcade game allows you to control a snake as it moves around the screen, eating food and growing longer with each meal. Be careful not to collide with the walls or yourself!
4+
5+
## How to Play
6+
7+
### Controls
8+
9+
- **'a'**: Move the snake left
10+
- **'d'**: Move the snake right
11+
- **'w'**: Move the snake up
12+
- **'s'**: Move the snake down
13+
- **'x'**: Quit the game
14+
15+
### Objective
16+
17+
- Eat the 'F' (fruit) to grow your snake.
18+
- Avoid running into the walls or the snake's own tail, as it will result in game over.
19+
20+
### Scoring
21+
22+
- Each 'F' eaten increases your score by 10 points.
23+
- The game speed may increase as your score grows, making it more challenging.
24+
25+
## Compiling and Running
26+
27+
To compile and run the game, follow these steps:
28+
29+
1. Compile the code using a C++ compiler like g++:
30+
```bash
31+
g++ -o snake snake.cpp
32+
33+
2. Run the compiled program:
34+
```bash
35+
./snake
36+
```
37+
38+
## Requirements
39+
40+
- C++ compiler (e.g., g++)
41+
- Windows OS (for 'conio.h' library)

0 commit comments

Comments
 (0)