This project is a classic Snake game implemented in Java using Swing for the GUI. It is a fun, interactive, and beginner-friendly project showcasing the use of Java's AWT and Swing libraries.
- Dynamic Gameplay: The snake grows longer as it consumes food.
- Collision Detection: The game ends if the snake collides with itself or the walls.
- Score Display: The player's score is displayed on the screen during gameplay.
- Smooth Animations: The game runs smoothly at a consistent speed using a timer.
git clone https://github.com/anujayavidmal2002/Snake_game_Using_java.git
- Up Arrow: Move up
- Down Arrow: Move down
- Right Arrow: Move right
- Left Arrow: Move left
- Objective: Control the snake and collect food to grow longer.
- Game Over:
- When the snake hits the walls.
- When the snake collides with its body.
- Your score is equal to the length of the snake.
- Java
- Swing
- AWT (Abstract Window Toolkit)
- Object-Oriented Programming (OOP) principles.
- Add levels with increasing difficulty.
- Implement a high-score system.
- Introduce obstacles on the board.
- Add a pause and restart feature.