Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Once you figure out how this works, it is pretty easy. You need to realize that this is actually a 1 D array bent around

Once you figure out how this works, it is pretty easy.
You need to realize that this is actually a 1D array bent around a square.
Create 2 parallel arrays. One for buttons and one for values. The button text matches the corresponding value.
At first, each element has a value of 0.
If the game rolls a 2, then the player, currently in spot 0, moves forward 2 spots and now is in spot 2 and that element increments by 1.
If the game rolls a 5, then the player, currently in spot 2, moves forward 2 spots and now is in spot 7 and that element increments by 1.
You will have to keep track of the playerPosition, since that is where the player is currently standing. Also, you will have to wrap when you get back to the beginning.
Addition: Add a button that rolls the die ONCE, and the results are all updated.
a) Create a GameBoard application that represents a game board with 16 spots. Use
buttons to represent the 16 spots. The application should simulate 100 dice rolls when
the user clicks 100 Dice Rolls and store in an array with meaningful indexes the total
number of times each spot was landed on based on the dice roll (moving around the
board clockwise from the Start location). The total count should be displayed on each
button. The application interface should look similar to the following after clicking
100 Dice Rolls:
b) Advanced. Modify the application so that spot 13 is a "Go Back" location. If spot 13 is
landed on, count it as being landed on but go back to spot 5, count it as being landed
on and continue from spot 5. Also, if doubles are consecutively rolled then go back to
spot 5.
c) Advanced. Add another feature. Think 'Snakes and Ladders' or 'Monopoly'.
Submission: Submit your complete project, zipped, here, along with a screen shot of it running. Include a comment explaining part c).using C# include sound feature and other intresting features
image text in transcribed

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

Database And Expert Systems Applications 15th International Conference Dexa 2004 Zaragoza Spain August 30 September 3 2004 Proceedings Lncs 3180

Authors: Fernando Galindo ,Makoto Takizawa ,Roland Traunmuller

2004th Edition

3540229361, 978-3540229360

More Books

Students also viewed these Databases questions

Question

david r and ella m. cole form 1040 in 2018 tax return

Answered: 1 week ago