Question: 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

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 lets 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 heres 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

Please notate .

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!