/Snakes-and-Ladders

An interactive two-players game of snakes and ladders

Primary LanguageJava

Snakes-and-Ladders

User’s Guide

This program stimulates the board game “Snakes and Ladders”, a two player game, by implementing and using many different methods and aspects. This game consists of four classes that each have their specific purposes and works together to make this program run. The physical game board look as follows: To begin this game, one would first read over all the instructions displayed in the console before any action/input is needed. After that, five options are displayed to the player, they can choose to either start a new game, display the winner list, search the winner list, find the highest score player( lowest number of steps to win), or exit the program. Whichever one the player chooses, the program will call its corresponsive method in another class to run the action. If “start a new game” is selected, then players() will be called from Player class. From there, the system will first get both the players names and begin the timer. players() calls spinOne() to begin the first person’s turn. They spin a spinner that has randomized a number between one to six as output. That number symbolizes the number of spots the player has to move. After arriving at its new location, the program calls Gameboard class, which holds all the locations of snakes and ladders to check if the player has landed on one. If so, the method will do adjustments according to the player's new location (either go up because of a ladder or go down because of a snake). After making sure the spot is safe, spinOne() calls checkOne(), which checks if the player has reached or passed 100. If they have, then it’s game over and they have won the game The number of steps and time it took for the player to win will be displayed. But if they haven’t, then it is now player two’s turn. Player two will then spin the spinner and move accordingly. After making sure player two haven’t reached or passed 100, it’s player one’s turn again. This repeats and continues till either one player reaches or passed 100, winning the game. After a game is won, Leadership class gets called and that player’s information (name, steps, time) will be saved in the winner list. In which, the user can choose to display, search or look for the highest score in the main options with the five options. After any of the actions have completed (other than exiting the program), the program will ask the user if they want to do something else, which will automatically take them to the correct options if they input “1” (meaning yes) to the question. The program will close when either the user inputs “5”, closing the system, or “2” when asked if they want to perform another action.