Question
Hi Guys.. Can you help me on this problem It is in Visual Basic 2015 format 1. Use a textbox on the form to determine
Hi Guys.. Can you help me on this problem
It is in Visual Basic 2015 format
1. Use a textbox on the form to determine the goal for the game. For example, the goal may be to earn 100 points. Use a KeyPress event for this textbox to restrict the data entry to digits, backspace, etc. 2. Player 1 takes a turn rolling 5 die (you will not need the 6th die from the Roll Em chapter example) Example: Bob rolls 5 die with these results: 4-6-3-1-4 3. If any of the 5 dice rolled includes a 6, Player 1 earns no points for that roll and Player 1s turn ends. Otherwise, the score for Player 1 is the total of the face values on the die and Player 1 rolls again. This continues (rolling and adding points) until Player 1 rolls a 6. Example: Bob points = 4+5+3+1+4 = 17 These points are added to Bobs total and Bob rolls again. HINT: A loop can be used to roll dice until 6 is rolled. 4. Player 2 follows the same rules. 5. The first player to reach the goal wins. 6. Display the winner of the game. 7. Allow the players to restart the game and play again.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started