Skip to content

TCExpert/Billard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

Billard Game in JavaFX

This is a simple single-player Billard game implemented in JavaFX. The game allows you to play with 15 colored balls and a white cue ball on a pool table.

Prerequisites

To run this JavaFX project, you need to have the following installed:

  • Java Development Kit (JDK) 8 or above
  • JavaFX SDK

Getting Started

  1. Clone the repository to your local machine or download the source code.
git clone <https://github.com/TCExpert/Billiard.git>
  1. Make sure you have JavaFX properly installed and set up on your system.

  2. Open the project in your preferred Java IDE (e.g., Eclipse, IntelliJ, Visual Studio).

  3. Set up the JavaFX libraries in your IDE. Depending on your IDE, the steps may vary. Here are some general instructions:

  • Eclipse:

    1. Right-click on the project folder and select "Properties."
    2. Go to "Java Build Path" and click on the "Libraries" tab.
    3. Click on "Add Library" and select "User Library."
    4. Click on "User Libraries" and then "New" to create a new library.
    5. Name the library "JavaFX" (or any name you prefer) and click "OK."
    6. Select the newly created library and click on "Add External JARs."
    7. Browse to the location where you have JavaFX installed and select all the JAR files in the "lib" folder.
    8. Click "Apply and Close" to save the changes.
  • IntelliJ IDEA:

    1. Go to "File" -> "Project Structure."
    2. Under "Platform Settings," select "Global Libraries."
    3. Click on the "+" icon to add a new library.
    4. Choose "Java" and browse to the location where you have JavaFX installed.
    5. Select all the JAR files in the "lib" folder and click "OK" to add them.
  1. Once the project and JavaFX libraries are set up, you can run the game by executing the Start.java file.

How to Play

  • Use the mouse to control the cue stick and aim for the target ball.
  • The further away the mouse is from the ball, the stronger the shot.
  • Release the mouse button to strike the cue ball and hit the target ball.
  • The objective is to pocket all the colored balls on the table using the white cue ball.

Enjoy playing the Billiard game!

License

This project is licensed under the MIT License.

About

JavaFX Billard Game

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages