need help!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • richy176
    New Member
    • May 2007
    • 8

    need help!

    hey...i am creating a program for college which i have to create a system for a school. there are 2 houses (green and yellow) and they have students in each house, all members from the green and yellow house compete against each other in 4 types of games, im stuck on a code where it requires me to shuffle the students names but i CANNOT have the same students competing against each other in more than 1 game. e.g. Bob from Green House faces Patrick from yellow house in a game of Snap....the requirements tell me that i cannot CANNOT have them 2 competing against each other again in any other game.

    can anyone help me with this dialemma?

    its urgent!

    thank you
  • danp129
    Recognized Expert Contributor
    • Jul 2006
    • 323

    #2
    Originally posted by richy176
    hey...i am creating a program for college which i have to create a system for a school. there are 2 houses (green and yellow) and they have students in each house, all members from the green and yellow house compete against each other in 4 types of games, im stuck on a code where it requires me to shuffle the students names but i CANNOT have the same students competing against each other in more than 1 game. e.g. Bob from Green House faces Patrick from yellow house in a game of Snap....the requirements tell me that i cannot CANNOT have them 2 competing against each other again in any other game.

    can anyone help me with this dialemma?

    its urgent!

    thank you
    Hmm so if you looped through all the players in green house and made each one of them play everyone in the yellow house but kept the game constant, you'd never get to play more than one game hehe. With that said, all you need to do is search the net or read your book on how to make a random number (don't forget to use randomize!) to select the game so there are a variety of games played. You'll also need to use 2 1D arrays or 1 2D array to loop through the names.

    If you HAVE to keep track of players that played together I think what I would do is use the dictionary object (add "Microsoft Scripting Runtime", Dim oDic as new Dictionary, google for example usage). Each time a game is played, set myvar to greenteam.NAME & "|" & yellowteam.NAME . Then use if dictionary.exit s(myvar) to find out if they have played together before, if not, let them play and add myvar to the dictionary.

    Try to implement those ideas where applicable and post your code if you're still stuck.

    Comment

    • Killer42
      Recognized Expert Expert
      • Oct 2006
      • 8429

      #3
      The experts on this site are more than happy to help you with your problems but they cannot do your assignment/program for you. Attempt the assignment/program yourself first and post questions regarding any difficulties you have or about a particular function of the code that you don't know how to achieve.

      Please read the Posting Guidelines and particularly the Coursework Posting Guidlines.

      Then when you are ready post a new question in this thread.

      MODERATOR

      Comment

      Working...