Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need to write a vba program to make the game Chutes and Ladders in excel Snakes and ladders is the original version of the game

Need to write a vba program to make the game Chutes and Ladders in excel

Snakes and ladders is the original version of the game Chutes and Ladders. This game consists of a square board made up of 100 squares (ten squares by ten squares). To play, players roll one or more dice and advance their token the rolled number of spaces. Arrival at the end of the board the hundredth square is the ultimate goal. In order to make the game interesting, there are snakes and ladders along the way. If a players token lands on the lower-numbered end of a ladder, the player moves the token up to the ladders higher-numbered square. If the player lands on the higher-numbered square of a snake (or chute), the token is moved down to the snakes lower-number square. Players take alternate turns to roll the die.

Write a VBA Sub Program to create the snakes and ladders game for two players using one die. The player who reaches the 100th square first wins the game. Below are the rules that you need to keep in mind while building this game.

a. Create a 10 X 10 board and place the snakes and ladders as shown in the next page.

b. Player 1 will start the game by rolling one die, which is a randomly generated number between 1 and 6 when the button Player 1 is clicked. He/She should advance his/her token the rolled number of spaces. Similarly, player 2 takes his/her turn when the button Player 2 is clicked. Players should alternate their turns.

c. If a players token lands on the lower-numbered end of a ladder, the player moves the token up to the ladders higher-numbered square. If the players token lands on the highernumbered square of a snake, the token is moved down to the snakes lower-numbered square.

d. The player who first reaches the 100th square is declared the winner.

f. Create a sub program for Player 1 and Player 2 separately.

g. Create a sub program to restart the game anytime when the button named Restart is clicked.

The blue arrow represents the ladders, and the orange arrow represents the snakes. If a players token lands on 18, the player should move up his/her token to 44. If a players token lands on 32, the player should move his/her token down to 11.

Indicate the players movement by changing the interior color of the cells. Differentiate the players movement with different colors which represent the token as shown below:image text in transcribed

12 13 93 100 | 99| 98 | 97 Player 1 93 78 63 58 92 79 62 59 73 68 53 player 2 Restart 23 13 9 20 10

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Flash XML Applications Use AS2 And AS3 To Create Photo Galleries Menus And Databases

Authors: Joachim Schnier

1st Edition

0240809173, 978-0240809175

More Books

Students also viewed these Databases questions

Question

=+ Be able to differentiate misbehavior from performance issues.

Answered: 1 week ago

Question

10:16 AM Sun Jan 29 Answered: 1 week ago

Answered: 1 week ago