All...
I'm building a tournament app that will pair opponents based on total points. I need to randomly group opponents with like totals. So, let's say I have 8 people playing today. After the first round, the standings are as follows:
Player 1 - Art - 3 pts.
Player 2 - Bob - 3 pts.
Player 3 - Chuck - 3 pts.
Player 4 - Dan - 1 pts.
Player 5 - Ernest - 1 pts.
Player 6 - Frank - 0 pts.
Player 7 - George - 0 pts.
Player 8 - Hank - 0 pts.
Here's the issue I'm trying to figure out:
I need people in the highest level to only play people in the highest or second highest level. So, Art (3 pts) will only play somebody with 3 pts or 1 pt.
I'm trying to decide how to accomplish this...using arrays? using sql queries?
Boy am I stumped on this one...
Thanks,
-J