# Thread: Running a game tournament

1. Member
Join Date
Oct 2012
Posts
64
Rep Power
0

## 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?

2. Member
Join Date
Oct 2012
Posts
64
Rep Power
0

## Re: Running a game tournament

Why does nobody ever say anything?

3. Senior Member
Join Date
Jan 2013
Location
United States
Posts
2,697
Rep Power
4

## 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

4. Member
Join Date
Oct 2012
Posts
64
Rep Power
0

## Re: Running a game tournament

I cannot believe nobody on the entire Internet has done this kind of thing before!

5. ## 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

6. Member
Join Date
Oct 2012
Posts
64
Rep Power
0

## Re: Running a game tournament

But the marking scheme of the assignment says "Correct usage of Maps to initiate tournament"?!

7. Senior Member
Join Date
Oct 2010
Posts
317
Rep Power
4

## 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.