This is a classic Snake game implemented in Rust using the Piston game engine. The player controls a snake that moves around the screen, eating food to grow longer while avoiding collisions with the walls and its own body. The game features smooth graphics, responsive controls, and a simple yet engaging gameplay experience.
- Classic Gameplay: Navigate the snake to eat food and grow longer.
- Collision Detection: The game ends if the snake collides with the walls or itself.
- Dynamic Food Generation: Food appears randomly on the screen, ensuring a continuous challenge.
- Game Over Screen: A visual indication when the game ends, with the option to restart.
- Adjustable Speed: Modify the snake's speed by changing the movement interval.
- Arrow Keys: Control the direction of the snake (Up, Down, Left, Right).
- ESC Key: Exit the game.
To run the game, ensure you have Rust installed on your machine. Clone the repository and run the following commands:
cargo build
cargo runThe game starts with a small snake that grows longer as it eats food. The objective is to eat as much food as possible without crashing into the walls or the snake's own body. The game features a simple and intuitive interface, making it easy for players of all ages to enjoy.
Contributions are welcome! If you have suggestions for improvements or new features, feel free to open an issue or submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.