Password for the game is set to "21DiceGame21" and your program should randomly ask for 3 letters in random positions(position start from 1 and not 0) for example
Type the character in position 4: i
Type the character in position 6: e
Type the character in position 8: a
If all three letters match the letters in those positions then display as correct password and start the game otherwise continue to repeat the step for asking 3 random letters in random positions.
This is a two-player dice game.
The player rolls two 6-sided dice once in each round and there will be a maximum of 5 rounds.
Point for the rounds are calculated as follows:
If we consider dice1 and dice2 as values of first and second 6-sided dice then
Dice1 | Dice2 | Points |
1 | 1 | 75 points added to their score |
2 | 2 | Subtract 50 points from their score |
3 | 3 | 100 points added to their score |
4 | 4 | Subtract 75 points from their score |
5 | 5 | Points will be set to 0 |
6 | 6 | Lucky! 300 points added to their score |
Cumulative points(Addition of points from all 5 rounds) for each player must be displayed after every round.
Game for a player should only be stopped under the following circumstances:
1. Player with the overall highest points should be displayed as a winner along with their points after 5 rounds.
2. If both the players' points are equal, then the players have to play 2 tiebreaker rounds to find the winner. Both the players points will start from 0 for the tie-breaker rounds. If the result from tie-breaker rounds end up in a tie then display the final result as draw otherwise display the winner with the highest points in tiebreaker rounds i.e. addition of points in tie-breaker round1 and round2.
Sample Output 1: see image.
Sample Output 2: When both the players score a negative value. see image.
Sample output3: Output for tiebreaker round results. see image.