Running a game tournament

• 04-26-2013, 12:21 PM
Hazza
Running a game tournament
I am currently doing a task where I have programmed a board game, and have made computer players of the game using various algorithms. I am now trying to make a tournament amongst my players where every player plays every other player twice, with either one being given the first turn. I then have to make a List that lists the league positions of these various players in descending order by number of games won. I have to use Maps to initiate the tournament, but have no idea what should be the key and what should be the value?
• 04-26-2013, 05:14 PM
Hazza
Re: Running a game tournament
Why does nobody ever say anything?
• 04-26-2013, 05:27 PM
jim829
Re: Running a game tournament
Ok. I will say something. It's only been 5 hours since your original post. Sometimes it can be several days for someone to reply. Be patient.

Regards,
Jim
• 04-27-2013, 12:49 PM
Hazza
Re: Running a game tournament
I cannot believe nobody on the entire Internet has done this kind of thing before!
• 04-27-2013, 01:03 PM
JosAH
Re: Running a game tournament
Suppose the players are given a number 0, 1, 2 ... N-1. An NxN square matrix can model your tournament. The diagonal of the matrix is empty (a player can't play against him/herself). Each cell can take one of three values: row-player won, column-player won, not-played-yet. You don't need a map for that.

kind regards,

Jos
• 04-27-2013, 01:38 PM
Hazza
Re: Running a game tournament
But the marking scheme of the assignment says "Correct usage of Maps to initiate tournament"?!
• 04-27-2013, 09:25 PM
Ronin
Re: Running a game tournament
Assuming you have a player object you could map the players to numbers/indexes to uniquely identify each instance instead of using for example array indexes.

Regards.