Trying to build a program that will similate nfl playoffs

I plan on using arrays to store each teams stats. Not sure how many stats i will use yet, but that is irrelevant to my problem. I want to use a single function that will run in a loop to simulate each game including the Superbowl and I think I need to use a copy function to send each team into their appropriate game. Ex: Team(AFC4) will play team(AFC5) and so on just as the nfl sets up the playoffs.
1. How do i use the copy function to take the arrays for each teams stats and call them to my game function? I am not sure where exactly a loop(s) will need to be placed but am sure it is needed. not familiar with copy function.

any suggestions would be helpful and appreciated!

Last edited on
Post the method (pseudo code) you propose using and we can go from there.
This is what I have in mind:
iostream<all necesary>
Double AFC1[i], AFC2[i],..., AFC6[i]; // same for NFC teams
Double teamA[],teamB[]
Main
{
Copystats (teamA, AFC4);
Copystats (teamB, AFC5);
(playgame(teamA, teamB))




}

bool Playgame (double[] team1, double[] team2)
{
Double Score1, score2;
//Game code yada yada
if (score1 > score2)
Return true;
else if (score1 < score2)
Return false;
else
Return playOT (Team1, Team2); // another simple function that randomly chooses winner.
}
Copystats (team[], team[])
{
For loop
temp[idx] = team[idx];
}

would like to display the winners of each game including superbowl champions.
Topic archived. No new replies allowed.