Results 1 to 7 of 7
  1. #1
    Hazza is offline Member
    Join Date
    Oct 2012
    Posts
    64
    Rep Power
    0

    Default 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. #2
    Hazza is offline Member
    Join Date
    Oct 2012
    Posts
    64
    Rep Power
    0

    Default Re: Running a game tournament

    Why does nobody ever say anything?

  3. #3
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    4,021
    Rep Power
    6

    Default 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
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

  4. #4
    Hazza is offline Member
    Join Date
    Oct 2012
    Posts
    64
    Rep Power
    0

    Default Re: Running a game tournament

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

  5. #5
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,770
    Blog Entries
    7
    Rep Power
    21

    Default 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
    cenosillicaphobia: the fear for an empty beer glass

  6. #6
    Hazza is offline Member
    Join Date
    Oct 2012
    Posts
    64
    Rep Power
    0

    Default Re: Running a game tournament

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

  7. #7
    Ronin is offline Senior Member
    Join Date
    Oct 2010
    Posts
    393
    Rep Power
    5

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

Similar Threads

  1. Tournament Pool and Bracket Tracker 0.6.1
    By java software in forum Java Software
    Replies: 0
    Last Post: 03-22-2013, 11:22 PM
  2. Game running far too fast on friend's computer
    By ruben381 in forum New To Java
    Replies: 2
    Last Post: 06-11-2012, 08:51 PM
  3. Replies: 7
    Last Post: 12-18-2011, 05:13 AM
  4. Replies: 0
    Last Post: 08-26-2009, 02:03 PM
  5. Help With Tournament Trees
    By wiggsfly in forum New To Java
    Replies: 2
    Last Post: 10-26-2008, 10:38 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •