I am creating a dice game where the user will play against the computer. The goal is to collect more points than the opponent but no more than 6 points. If the sum of either player goes over 6 the game ends and the player has lost.
The game starts by showing the instructions to User. First Bot generates a random number (1-6) to User and to itself. Then it displays the numbers and asks whether User wants to continue. If User wants to continue Bot generates a random number to User and then decides if itself will continue and generate a random numbers to itself. The game goes on until User decides to stop rolling after which Bot may still have one roll unless it has decided to stop earlier. The game stops by displaying the winner and generated numbers of all rounds.
The problems I currenty am working are:
- After the user enters his name, the name is not displayed in the following message box.
- Once both have rolled the dice, and decide if they want to continue or not, how can I compare the results to see who won and display the winner and generated numbers of all rounds?
- If both players have under 6 after the first turn and continue, the results of the second
roll should be added to the first one.
After the second roll, should I add a Do While loop to continue the process or a flow decision?
Dice Game.xaml (7.7 KB)
Thanks and regards,