Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I need help with VBA!! Snakes and ladders is the original version of the game “C

ID: 3606528 • Letter: I

Question

I need help with VBA!!

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 player’s token lands on the lower-numbered end of a “ladder”, the player moves the token up to the ladder’s higher-numbered square. If the player lands on the higher-numbered square of a “snake” (or chute), the token is moved down to the snake’s 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 Model Implement ENGR 1412 - INTRODUCTION TO COMPUTER PROGRAMMING Dr. Jennifer Glenn, Fall 2017 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 player’s token lands on the lower-numbered end of a ladder, the player moves the token up to the ladder’s higher-numbered square. If the player’s token lands on the highernumbered square of a snake, the token is moved down to the snake’s 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 player’s token lands on 18, the player should move up his/her token to 44. If a player’s token lands on 32, the player should move his/her token down to 11. Indicate the player’s movement by changing the interior color of the cells. Differentiate the player’s movement with different colors which represent the token as shown below:

Explanation / Answer

class WarWithArray{

     private String[] data;
     private int size;
     public WarWithArray(String[] s,int k){
          data = s;
          size = k;
     }
     ArrayList<String> compute2k(){

          ArrayList<String> list = new ArrayList<String>()
          for (int i = 0; i<data.length; i++){
              for(j=0;j<data.length; j++){
                  if (i != j)
                     list.add(data[i] + data[j]);
              }
          }
          return list;
     }
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote