A simple Snake game built in pure C# using the console.
No external libraries required — perfect for low-resource environments (like nomodeset).
Before running the project, make sure you have:
You can verify your installation with:
dotnet --version- Clone the repository:
git clone https://github.com/your-username/snake-console-game.git- Navigate into the project folder:
cd snake-console-game- Run the game:
dotnet run- Arrow Keys → Move the snake
- The snake will continuously move in the current direction
You lose the game if:
- You hit the walls
- You collide with your own body
When the game ends, you will see:
Game Over
To play again, simply restart the program:
dotnet runThis project demonstrates:
- Game loop using
while - Real-time keyboard input
- Basic collision detection
- Data structures with
List
SnakeConsoleGame/
├── Program.cs
├── SnakeConsoleGame.csproj
└── README.md
- Designed to run in a standard terminal
- Works without GPU acceleration
- Ideal for learning game logic fundamentals in C#
This project is open-source and free to use.