Rock Paper Scissors Double Round Robin Tournament Solution
Objective:
Write a program which simulates a rock, paper, scissors double round robin tournament using a circular linked list. Each player in the tournament is controlled by the computer, and they randomly choose rock, paper, or scissors each round. The computer players have a win, lose, and tie record, which is displayed at the end.
Notes:
Rock wins over scissors, scissors wins over paper, and paper wins over rock. A circular linked list is just like a single linked list (which was demonstrated in class) except the last element links to the first element. A double round robin tournament is when each contestant competes against all other contestants in one round. In the double tournament each contestant competes against the other twice. For instance it let’s assume there are 5 contestants named 0-4. The first round would be 0 vs 1, 0 vs 2, 0 vs 3, 0 vs 4. Then round two would be 1 vs 2, 1 vs 3, 1 vs 3, 1 vs 0. This continues until everyone competes against everyone else twice. Suggested Methodology
You can solve this in any number of ways, and here’s a way you may take to approach this problem.
Make a generic circular linked list Make a class player which has a name, number of wins, number of losses, and number of ties Use the inherit properties of a circular linked list to schedule the tournament Example Dialog:
Welcome to the Rock Paper Scissors Tournament!
We have 10 players. Let’s BEGIN!
0 uses Rock
1 uses Rock
TIE!
0 uses Rock
2 uses Paper
2 Wins!
0 uses Scissors
3 uses Paper
0 Wins!
0 uses Scissors
4 uses Scissors
TIE!
0 uses Scissors
5 uses Scissors
TIE!
0 uses Rock
6 uses Scissors
0 Wins!
0 uses Rock
7 uses Scissors
0 Wins!
0 uses Scissors
8 uses Paper
0 Wins!
0 uses Paper
9 uses Paper
TIE!
1 uses Rock
2 uses Rock
TIE!
1 uses Paper
3 uses Scissors
3 Wins!
1 uses Rock
4 uses Paper
4 Wins!
1 uses Paper
5 uses Rock
1 Wins!
1 uses Rock
6 uses Rock
TIE!
1 uses Scissors
7 uses Rock
7 Wins!
1 uses Paper
8 uses Paper
TIE!
1 uses Rock
9 uses Paper
9 Wins!
1 uses Scissors
0 uses Scissors
TIE!
2 uses Paper
3 uses Paper
TIE!
2 uses Rock
4 uses Paper
4 Wins!
2 uses Rock
5 uses Rock
TIE!
2 uses Paper
6 uses Paper
TIE!
2 uses Paper
7 uses Rock
2 Wins!
2 uses Rock
8 uses Paper
8 Wins!
2 uses Rock
9 uses Rock
TIE!
2 uses Rock
0 uses Scissors
2 Wins!
2 uses Paper
1 uses Scissors
1 Wins!
3 uses Rock
4 uses Paper
4 Wins!
3 uses Scissors
5 uses Scissors
TIE!
3 uses Scissors
6 uses Scissors
TIE!
3 uses Scissors
7 uses Paper
3 Wins!
3 uses Rock
8 uses Rock
TIE!
3 uses Rock
9 uses Paper
9 Wins!
3 uses Scissors
0 uses Paper
3 Wins!
3 uses Paper
1 uses Scissors
1 Wins!
3 uses Rock
2 uses Paper
2 Wins!
4 uses Rock
5 uses Paper
5 Wins!
4 uses Scissors
6 uses Paper
4 Wins!
4 uses Scissors
7 uses Scissors
TIE!
4 uses Rock
8 uses Paper
8 Wins!
4 uses Rock
9 uses Rock
TIE!
4 uses Scissors
0 uses Rock
0 Wins!
4 uses Paper
1 uses Paper
TIE!
4 uses Paper
2 uses Scissors
2 Wins!
4 uses Paper
3 uses Scissors
3 Wins!
5 uses Paper
6 uses Paper
TIE!
5 uses Scissors
7 uses Paper
5 Wins!
5 uses Scissors
8 uses Rock
8 Wins!
5 uses Rock
9 uses Scissors
5 Wins!
5 uses Scissors
0 uses Rock
0 Wins!
5 uses Rock
1 uses Rock
TIE!
5 uses Scissors
2 uses Paper
5 Wins!
5 uses Scissors
3 uses Rock
3 Wins!
5 uses Rock
4 uses Rock
TIE!
6 uses Scissors
7 uses Scissors
TIE!
6 uses Rock
8 uses Paper
8 Wins!
6 uses Rock
9 uses Paper
9 Wins!
6 uses Rock
0 uses Scissors
6 Wins!
6 uses Scissors
1 uses Paper
6 Wins!
6 uses Rock
2 uses Scissors
6 Wins!
6 uses Rock
3 uses Paper
3 Wins!
6 uses Scissors
4 uses Rock
4 Wins!
6 uses Paper
5 uses Paper
TIE!
7 uses Rock
8 uses Scissors
7 Wins!
7 uses Paper
9 uses Rock
7 Wins!
7 uses Rock
0 uses Scissors
7 Wins!
7 uses Scissors
1 uses Paper
7 Wins!
7 uses Rock
2 uses Paper
2 Wins!
7 uses Paper
3 uses Rock
7 Wins!
7 uses Scissors
4 uses Scissors
TIE!
7 uses Rock
5 uses Rock
TIE!
7 uses Paper
6 uses Rock
7 Wins!
8 uses Rock
9 uses Scissors
8 Wins!
8 uses Rock
0 uses Rock
TIE!
8 uses Paper
1 uses Rock
8 Wins!
8 uses Paper
2 uses Rock
8 Wins!
8 uses Paper
3 uses Rock
8 Wins!
8 uses Scissors
4 uses Rock
4 Wins!
8 uses Paper
5 uses Scissors
5 Wins!
8 uses Paper
6 uses Paper
TIE!
8 uses Paper
7 uses Rock
8 Wins!
9 uses Paper
0 uses Paper
TIE!
9 uses Paper
1 uses Paper
TIE!
9 uses Scissors
2 uses Paper
9 Wins!
9 uses Scissors
3 uses Scissors
TIE!
9 uses Scissors
4 uses Rock
4 Wins!
9 uses Rock
5 uses Scissors
9 Wins!
9 uses Paper
6 uses Scissors
6 Wins!
9 uses Paper
7 uses Paper
TIE!
9 uses Scissors
8 uses Paper
9 Wins!
The tournament is over here are the results!
Name 0 Wins 6 Ties 7 Losses 5
Name 1 Wins 3 Ties 8 Losses 7
Name 2 Wins 6 Ties 5 Losses 7
Name 3 Wins 6 Ties 5 Losses 7
Name 4 Wins 7 Ties 6 Losses 5
Name 5 Wins 5 Ties 8 Losses 5
Name 6 Wins 4 Ties 7 Losses 7
Name 7 Wins 7 Ties 5 Losses 6
Name 8 Wins 9 Ties 4 Losses 5
Name 9 Wins 6 Ties 7 Losses 5
Submit the files to the drop box (https://dropbox.cse.sc.edu)