Guest User

Team assignment algorithm

a guest
Nov 5th, 2011
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. 1. Figure out max players on team (total players / number of teams) rounded down (maxP)
  2. 2. Sort clans by size
  3. 3. for each clan
  4. if clan > maxP, randomly assign maxP players to smallest team
  5. 4. sort remaining players by ranking, highest to lowest
  6. 5. for each player
  7. assign to smallest team
  8.  
Advertisement
Add Comment
Please, Sign In to add comment