This is a classic Snake Game implemented in Java. It features a simple yet addictive gameplay where the player controls a snake that moves around the screen, eats food to grow longer, and must avoid colliding with itself or the boundaries.
🕹️ Intuitive controls: Use arrow keys to control the snake's direction.
🍎 Randomly generated food: Each time the snake eats, a new food item appears at a random location.
📈 Increasing difficulty: The snake's speed increases as it consumes more food.
🚫 Collision detection: The game ends if the snake collides with itself or the screen boundaries.
📊 Score tracking: Keep track of your high score and current score during gameplay.
1.Clone the repository to your local machine.
2.Compile and run the SnakeGame.java file.
3.Use arrow keys to control the snake and navigate around the screen.
4.Eat the food to grow longer and increase your score.
5.Be careful not to collide with the snake's own body or the screen boundaries!
Java: Core programming language.
Swing: GUI library for creating the game window and components.
If you'd like to contribute to the project, feel free to fork the repository and submit a pull request with your improvements or bug fixes.
This project is inspired by the classic Snake Game and serves as a fun way to practice Java programming.