Snake Game is a classic arcade game where the player controls a snake that moves around the screen, eating food pellets to grow longer. The game continues until the snake collides with itself or the boundaries of the play area. It's a simple yet addictive game that tests the player's reflexes and strategy.
- Classic snake gameplay with intuitive controls.
- Increasing difficulty as the snake grows longer.
- Score tracking to keep track of the player's progress.
- Sound effects for enhanced gameplay experience.
- Leaderboard to display top scores.
- JavaFX for the user interface.
- Java programming language for game logic.
- Git for version control.
- IDE: IntelliJ IDEA
- Java Development Kit (JDK) installed on your system.
- Git installed on your system (optional).
- MySQL installed on your system.
-
Clone the repository: git clone https://github.com/CharakaMihiranga/snake-game.git
-
Open the project in your preferred IDE.
-
Build and run the project.
- Navigate to the
src/main/resources/sql
directory in your project. - Execute the SnakeGame.sql script to create the database schema: mysql -u username -p < SnakeGame.sql
Replace username
with your MySQL username. You will be prompted to enter your MySQL password. Alternatively, you can use a MySQL client to execute the script.
- Use arrow keys or WASD keys to control the direction of the snake.
- Eat food pellets to grow longer.
- Avoid colliding with the snake's body or the edges of the play area.
This project was inspired by the classic Snake game.