Question: Snakes and Ladders is a simple game in which each player takes a turn to roll a die and move their counter by the number
Snakes and Ladders is a simple game in which each player takes a turn to roll a die and
move their counter by the number shown on the die. If a player's counter happens to land
on the bottom of a ladder they move up the ladder to the square at the top of the ladder;
fi a player's counter lands on the head of a snake they move down the snake to the square at the end of the snake's tail. All the players' counters start on square one and each player
rolls the die in turn and moves their counter. The game ends when one of the players' counters lands directly on or would move beyond, the finishing square square
The game board is illustrated below in Figure Note, only a single snake or ladder can terminate on any given square.
Figure : Snakes and Ladders Board
Your task is to create a program which simulates the game of Snakes and Ladders, and produces an output similar to that shown in Listing The output will not be exactly the same because you need to simulate the roll of the die which produces a random value for
each roll.
You are required to provide the complete code for simulating the game. Your solution must make appropriate use of classes and objects, and conform to good coding principles
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
