This is a simple snake game for windows console and linux console. It's written in C# and uses .NET 9
This is a simple snake game for windows console and linux console. It's written in C# and uses .NET 9
Snake eat food and grow. The game is over if the snake hits the wall or itself.
Food gives points.
- Food 🍎 gives 10 points.
- Food 🍌 gives 11 points.
- Food 🍒 gives 12 points.
Food is placed randomly on the board. Food size is more than one field so you have to cath the left side of the food to eat it.
The snake can move up, down, left and right.
The score is shown in the top.
- Windows console support
- Linux console support
- Score system
To get a local copy up and running follow these simple steps.
Get zip and extract zip file from github
# Define the URL and the destination file path
$url = "https://github.com/TirsvadCLI/Dotnet.Game.Snake/releases/download/1.1.2/Snake.zip"
$destination = "Snake.zip"
$unzipPath = "Snake"
# Download the file
Invoke-WebRequest -Uri $url -OutFile $destination
# Unzip the file
Expand-Archive -Path $destination -DestinationPath $unzipPath
# Remove the zip file
Remove-Item $destination
# Navigate to the extracted folder
Set-Location -Path $unzipPath
#Run the game
.\Snake.exe
Get zip and extract zip file from github
# Define the URL and the destination file path
url="https://github.com/TirsvadCLI/Dotnet.Game.Snake/releases/download/1.1.2/Snake.zip"
destination="Snake.zip"
unzipPath="Snake"
# Download the file
wget -O $destination $url
# Unzip the file
unzip $destination -d $unzipPath
# Remove the zip file
rm $destination
# Navigate to the extracted folder
cd $unzipPath
#Run the game
./Snake.exe
We are using Visual Studio 2022 for development. You can use any IDE you want.
# Clone the repo
git clone https://github.com/TirsvadCLI/Dotnet.Game.Snake.git
- Add more food types
- Add bad food which reduce score (time limited witch it change food type)
- Speed up game when snake eat food
- World highscore online
- Multi language support
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
If you encounter a bug or have an issue to report, please follow these steps:
-
Go to the Issues Page
Navigate to the GitHub Issues page. -
Click "New Issue"
Click the green "New Issue" button to create a new issue. -
Provide Details
- Title: Write a concise and descriptive title for the issue.
- Description: Include the following details:
- Steps to reproduce the issue.
- Expected behavior.
- Actual behavior.
- Environment details (e.g., OS, .NET version, etc.).
- Attachments: Add screenshots, logs, or any other relevant files if applicable.
- Submit the Issue
Once all details are filled in, click "Submit new issue" to report it.
Your feedback is valuable and helps improve the project!
Distributed under the GPL-3.0 License.
Jens Tirsvad Nielsen - LinkedIn