This is a Snake and Ladders Game made using JavaFX. It can be played between two individuals and the first one to reach the 100th square wins. The game is made using the concepts of Object Oriented Progamming, Multithreading and GUI.
- Vibhor Agarwal, CS Undergraduate at IIIT Delhi
- Pritish Poswal, CS Undergraduate at IIIT Delhi
- First clone this repository
- Setup the JavaFX in the local system.
- Open the project folder in
IntellIj Idea
- Go to the Project Structure and JavaFX lib folder in the libraries
- Now go to
Edit Configuration
under theRun
tab. - In the VM Options add the following
--module-path
"C:\Program Files\JavaFX\lib"
--add-modules
javafx.controls,javafx.fxml,javafx.base,javafx.graphics,javafx.media,javafx.swing
- The game can be run from Run Button in Main class in application package
The game has most features that we can expect. It has a custom Snake and Ladders logo in windows taskbar and a custom header title.
The main menu of the game is present below
- We have and Info and Credits screen as well. There is an
animation
for switching between different buttons.
- We can now start the game from start button
- Here we have a dice animation which simulates the dice roll. This involves
multithreading
for efficient resource use.
We have snake bite and ladder climbing animations as well. The ladders are made using co-ordinate geometry
lines using slopes.
- The game has a winning which shows who has won the game.
The following UML will help to identify the class, class relationships and other implementation details of the code. UML Diagram Link
Feel free to fork the repository and customise the game to your liking. You can also try the items in the below checklist
- Implement the piece color and player name picker.
- Make the piece follow the snakes body while going down.
- Implement music in the game.