Question

C/C++

For this assignment, you will design a Snakes and Ladders game called WatchTheWigglers. In this game there is one player. The game presents the player with a board with numbers shown in a 5 x 5 chart as in Figure 1 below.

Please note that the chart shown is labeled with numbers for visual clarity, for the purpose of explanation, and to guide play. The game must show the numbers to the users in the given positions.Also the lines on your board do not have to look exactly like the lines presented in Figure 1.

Step 2: The game will then use a random number generator to generate three pairs of distinct numbers between 1 and 25. The second number in each pair must be greater than the first number in the pair. An example of some pairs that may be generated might be: 1 and 21; 12 and 20; 22 and 25. These are the ladder pairs. The first number is the bottom of the ladder and the second number is the top of the ladder. The numbers are not shown to the user.

Step 1: At the start of the game, the game will print a message to explain WatchTheWigglers to the player, ask them for the player's name, and welcome them by name.

Step 3: The game will then use a random number generator again to generate three new pairs of distinct numbers between 1 and 25. The first number in each pair must be greater than one and the second number must be less than the first number in the pair. An example of some pairs that may be generated might be: 2 and 1; 13 and 10; 20 and 3. These are the snake pairs. The first number is the top of the snake and the second number is the bottom of the snake. The numbers are not shown to the user.

The game will use the six numbers to set the positions of the snakes and the ladders.

So, for example, for the example given, the board will look as follows (Where Top is the top of the Ladder or Snake and Bot is the Bottom of the Ladder or Snake):

The board resulting from the numbers generated is shown to the user.

Each time the player rolls, they must be told where they have landed with a message such as "YOU ARE AT POSITION 2". If they are repositioned because of a snake or a ladder, they must be told their new position.

Step 4: When the board has been generated and shown to the user, the game must then tell the player to roll a die. When the user types in "ROLL", the game's random number generator must generate a number between 1 and 6 inclusive. The user must roll (by typing "ROLL") to get on the board. So when the user types roll repeatedly, (as an example) the game might generate the numbers: 2, 5,6,6,3 and 1 in sequence. So the user would start the game on position 2 and be repositioned to position 1 (because of the snake); roll and then move to position 6; roll and then move to position 12 (nothing happens); roll then move to position 18; roll then move to position 21 (nothing happens); roll then move to position 22 and be repositioned to position 25 (because of the ladder); and they win!Each time the player rolls, they must be told where they have landed with a message such as "YOU ARE AT POSITION 2". If they are repositioned because of a snake or a ladder, they must be told their new position.

It is important to note that there are four scenarios of particular interest. They are as follows:

a. The user rolls and lands at the bottom of a ladder. In this case the player is moved to the position at the top of that ladder.

d. The user rolls and lands at the top of a snake, is moved to the position at the bottom of the snake, and there is a snake or a ladder at the position that they are moved to. In this case,nothing happens. The player will not be moved twice.

b. The user rolls and lands at the top of a snake. In this case the player is moved to the position at the bottom of the snake.

C.The user rolls and lands at the bottom of a ladder, is moved to the position at the top of that ladder, and there is a snake or a ladder at the position that they are moved to. In this case,nothing happens. The player will not be moved twice.

Step 5: When a player reaches position 25 they have won the game, so they will keep rolling until they reach that point (or land beyond 25). When this occurs the game must say "CONGRATS, YOU BEAT THE WIGGLERS!"

3. An innovation beyond these specifications. Justify its necessity and novelty in the comments.(10%). The 10% is given as follows – 5% for the innovation, 5% for an explanation about the uniqueness and need for the innovation. Those innovations that are most different from the rest of the class will be given the highest score of 5%, those that are the least different will be given a score of 1%.

You are required to submit your assignment with a header page (Your name, Lecturer name,Assignment Name) all parts of the submission must be typed in Arial font at 11 or 12 point; and grammar and spelling must be correct (1%). You must hand in the plagiarism contract with your assignment.

Important Notes

Your solution must include:

You are required to develop a COMPLETE pseudo code algorithm solution for WatchTheWigglers. You can use simple variables for this and are not required to use any variable types beyond simple variable types like int, char, float etc. The only arrays that are necessary is to be used for the player's name and the command "ROLL".

State all assumptions, but do not presume. If you are unclear, ask questions.This the Requirements Gathering phase of the Software Life Cycle.

1. A commented pseudocode algorithm (50%)

2. A flowchart for the algorithm (40%)


Answer

Verified

Related Questions

Submit query

Getting answers to your urgent problems is simple. Submit your query in the given box and get answers Instantly.

Submit a new Query

Please Add files or description to proceed

Success

Assignment is successfully created