Skip to content

Repository files navigation

"# snake-game" (Terminal-Based)

Description

This is a simple Snake game implemented in C#, designed to be played in the terminal. The game follows the classic Snake mechanics where the player controls a growing snake that moves around the screen, consuming food while avoiding collisions with the walls and itself. The goal is to achieve the highest possible score by eating food and growing the snake.

Features

  • Classic Snake gameplay in a terminal interface.
  • Real-time keyboard controls for movement.
  • Randomized food spawning mechanics.
  • Increasing difficulty as the snake grows.
  • Score tracking system.
  • Simple, clean, and lightweight implementation.

Requirements

  • .NET SDK (version 6.0 or later recommended)
  • Windows, macOS, or Linux with a terminal that supports .NET applications

Installation

  1. Clone the repository:
    git clone https://github.com/hilarycodes/snake-game/
  2. Navigate to the project directory:
    cd snake-game
  3. Build the project:
    dotnet build

How to Play

  1. Run the game:
    dotnet run
  2. Use the arrow keys (, , , ) to control the snake's movement.
  3. Eat the food to grow the snake and increase your score.
  4. Avoid hitting the walls and yourself to prevent the game from ending.
  5. Try to achieve the highest score possible!

Future Enhancements

  • Implementing different difficulty levels.
  • Adding a high-score tracking system.
  • Introducing obstacles to increase challenge.
  • Enhancing game visuals using ASCII art.

Contributing

Contributions are welcome! If you find a bug or have a feature request, feel free to open an issue or submit a pull request.

Acknowledgments

  • Inspired by the classic Snake game.
  • Developed using C# and .NET for a lightweight and portable experience.

About

A snake game that will run in the terminal

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages