Skip to content

charakamihiranga/Snake-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snake Game

Description

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.

Screenshot

Screenshot

Screenshot

Features

  • 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.

Technologies Used

  • JavaFX for the user interface.
  • Java programming language for game logic.
  • Git for version control.
  • IDE: IntelliJ IDEA

Getting Started

Prerequisites

  • Java Development Kit (JDK) installed on your system.
  • Git installed on your system (optional).
  • MySQL installed on your system.

Installation

  1. Clone the repository: git clone https://github.com/CharakaMihiranga/snake-game.git

  2. Open the project in your preferred IDE.

  3. Build and run the project.

Setting Up the Database

  1. Navigate to the src/main/resources/sql directory in your project.
  2. 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.

Usage

  • 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.

Acknowledgements

This project was inspired by the classic Snake game.

About

A classic Snake game developed using Java and JavaFX.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published