Question: Hi i just need help with this this sorting ties with the dice please use java and scanner only (no mapping, etc) In this part,

Hi i just need help with this this sorting ties with the dice please use java and scanner only (no mapping, etc)

In this part, you need to create a class called LadderAndSnake. A LadderAndSnake object has a board of 10x10 and a number of players attached to it, which is initialized at the creation time of the object. The number of players must be between 2 and 4 inclusively. The number of players must be set through the use of a parameterized constructor of the class.

Besides the constructors, and all basic methods in the class, the class must include two methods, one called flipDice(), which should return a random value between 1 and 6 inclusively. The other method is called play(), which actually initiate the core engine of the game where the players start to play the game. The rules of the game are as below: Before any of the players starts playing, the order of playing turns must be determined. For that, each player must throw the dice to obtain the largest possible number. In case of a tie between any of the players, the process is repeated only between those players. This process is concluded once the order of playing is determined.

sample output:

Game is Played by x players (where x is the number of players set for that game); - Now deciding which player will start playing;

Player 1 got a dice value of 5

Player 2 got a dice value of 3

Player 3 got a dice value of 3

A tie was achieved between Player 2 and Player 3. Attempting to break the tie

Player 2 got a dice value of 2

Player 3 got a dice value of 6

Reached final decision on order of playing: Player 1, Player 3, Player 2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!