Advertisement
MLSTRM

rob seeding thing

Jan 30th, 2017
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. assume 8 groups of 16 people leading to a 8-person final bracket
  2.  
  3. seeds are 1-128
  4.  
  5. Group A is seeds 1-16
  6. Group B is seeds 17-32
  7. etc.
  8.  
  9. 1->1
  10. 2->17
  11. 3->33
  12. 4->..
  13. ...
  14. 8->113
  15. ...
  16. 9->2
  17. 10->18
  18. 11->34
  19. ...
  20. 128->128
  21.  
  22. seed mod 8 = group (1-8:A-H)
  23. (remainder-1)*16 = modifier
  24.  
  25.  
  26. x=(8*y)+z y is 1-16, z is 1-8
  27.  
  28. 2 = (8*0)+2
  29. seed = ((2-1)*16)+(0+1)
  30.  
  31.  
  32. 11 = (8*1)+3
  33. seed = ((3-1)*16)+(1+1) = 32+2 = 34
  34.  
  35. new = (((seed mod 8)-1)*16) + (floor(seed/8)+1)
  36.  
  37. new = (((seed mod [#groups])-1) * [#people per group]) + (floor(seed/[#groups])+1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement