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 36).
The game board is illustrated below in Figure 1. Note, only a single snake or ladder can terminate on any given square.
363534333231
25
26
2728
2024
22
21
1713
1
14
1210
2
6 Figure 1: 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 2. 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 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!