Skip to content

Naciri-Anas/SnakeGame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snake Game in Java 🐍🎮

Overview

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.

Features

🕹️ 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.

How to Play

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!

Technologies Used

Java: Core programming language.

Swing: GUI library for creating the game window and components.

Contributing

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.

Acknowledgments

This project is inspired by the classic Snake Game and serves as a fun way to practice Java programming.

Screenshots

App Screenshot

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages