Hello Amy, welcome to TSF!
I'm glad to hear that you chose to get back into school for such a degree. We can't directly help you as per the TSF
rules:
Quote:
|
You may not ask for assistance with homework assignments, projects or book reports for school college or university
|
We can however help you understand the topic better and push you in the right direction.
Quote:
|
You will develop a simple windows-based game of dice. The game is played once only, and here are the rules for 2 players:
|
This part means that you should only have the program run the game conditions one time. Therefore, once a round of the game has finished it should close the program. No need for multiple rounds or restarts.
Quote:
|
You choose if you wish to be player 1 or player 2
|
This just means you have to create a starting option to choose whether you're player 1 ( who gets the two dice rolled first ) or player 2 ( who gets the two dice rolled second ).
Quote:
|
2 dice are rolled on behalf of player 1
|
By dice in the instructions you should assume a standard six-side die ( two of them ). The rolls should produce random values between or equal to 1 and 6 to indicate sides of a standard die. You should have these random values saved in two separate variables for the player specifically.
Quote:
|
2 dice are rolled on behalf of player 2
|
This is the same as player 1's rolls, though it's after player 1 has rolled their dice. You should save these values in two separate variables specific to player 2.
Now, for the winning conditions I'll describe them by the first condition you should check for up to the last condition you should check for after the rolls.
Quote:
|
c. If both outcomes are a double, then the player with the higher double wins, and if the doubles are equal, it is a draw
|
This should be checked first. If both players have double numbers ( example '3-3' and '1-1' ) in their rolls, you have to add each players numbers together and see which value is the largest. In the example I give, player 1 would win since their numbers add up to 6 while player 2 adds up to 2. If they have the same values ( example '4-4' and '4-4' ), the game has a draw.
Quote:
|
If one outcome is a double, and the other is not, the player with a double wins and the totals will be irrelevant
|
If one of the players have a dice roll that has two matching numbers while the other player doesn't have matching numbers, the player with the matching numbers wins regardless of what the dice add up to. This could mean that player 1 has a '6-5', but if player 2 has a '1-1' player 2 is still the victor.
Quote:
|
a. If neither of the outcomes are a double such as ‘1-1’ or ’2-2’ or ’3-3’ or ‘4-4’ or ‘5-5’ or ‘6-6’ one of player 1 with the larger total wins, and if the totals are equal, it is a draw
|
This is the final condition to check if none of the other conditions apply to the dice rolls. If the players don't have doubles in their rolls, then their dice values will add together to see who has the higher amount. The one with the higher amount wins. If they have the same amount, it ends in a draw.
Make sure to use comments in your source code as that's what professors look for when they see work being turned in.