Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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.

image text in transcribed

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

i am having trouble doing this i hope someone help me do it.

13 100 998 79659493 92 91 Player 1 53 Player 2 Restart 21 22 23 242526 10 1

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

Step: 3

blur-text-image

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

AutoCAD Database Connectivity

Authors: Scott McFarlane

1st Edition

0766816400, 978-0766816404

More Books

Students also viewed these Databases questions

Question

Introduce yourself with an elevator speech

Answered: 1 week ago

Question

Know the three main dimensions of the service environment.

Answered: 1 week ago

Question

Understand the roles of signs, symbols, and artifacts.

Answered: 1 week ago

Question

Discuss the key ambient conditions and their effects on customers.

Answered: 1 week ago