This is a very basic Snake game implemented in C, created as a learning project to solidify my understanding of the C programming language. The project covers essential programming concepts and demonstrates how to build a simple game from scratch using C.
- Basic Snake Gameplay: Navigate the snake around the screen, collecting apples to grow in length.
- Score Tracking: The score increases as the snake consumes apples.
- Adjustable Speed: Choose between different speed levels to change the game's difficulty.
- Boundary Detection: The game ends if the snake hits the wall or itself.
To compile and run this project on Windows, you'll need MinGW. If you don't already have it, you can download it here. Make sure to add MinGW to your system's PATH.
- Clone the repository to your local machine.
- Open PowerShell and navigate to the
src
directory of the project. Replace the path in the command below with the path wheremain.c
is located on your machine:
cd "c:\Users\Utilisateur\Documents\SOURCE\GitHub\snake\src\"
- Compile and run the game with the following command:
gcc main.c -o main ; if ($?) { .\main }
This command compiles the C code and runs the resulting executable.
If you encounter any issues, feel free to contact me via the email address provided in my profile, or open an issue on GitHub.
I welcome contributions and suggestions to improve this project. If you would like to contribute, you can submit a pull request or open an issue on GitHub.
This project is licensed under the MIT License. For more details, see the LICENSE file.