Tournament event system
Make a dice roll function, that would determine team event pick que.
It will generate random values from 2 to 12 (two dices) for each team. It will bubble sort the teams
in an array to make a que for teams to choose events they want to participate in.
e.g. “Team 1 rolls 8”, “Team 2 rolls 9”, “Team 3 rolls 2”, “Team 4 rolls 12”
So, the team que according to the function will be:
1. Team 4
2. Team 2
3. Team 1
4. Team 3
Then, it will ask for the Team 4 (since it rolled the highest value) to choose 1 out of 5 events.
e.g. “Team 4, please choose 1 out of 5 possible events that you will be participating, by typing in
their number.”
*Displays the event*
“1. Event One 2. Event Two 3. Event Three 4. Event Four 5. Event Five”
After the team chooses the event, it will store the choice for the specific team.
Array that contains 4 place holders for the choices
When the events have been assigned to the teams, then each member in the teams will start taking
their part in the event.
e.g. “Team 1 started Event Three”
“Member 1 from Team 1 has scored 14 (random value)”
“Member 2 from Team 1 has scored 32 (random value)”
“Member 3 from Team 1 has scored 15 (random value)”
“Member 4 from Team 1 has scored 76 (random value)”
“Member 5 from Team 1 has scored 4 (random value)”
After the team finished their event, they it will calculate the total score and put it into the score
array. In the score array the score will be bubble sorted and the winners will be decided.
, 1. Output members of teams using for loops
2. If statements based on the chosen event
3. If statements will contain main formula for which the score will be calculated
4. The if statement has to be in the for loop