Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function matchMaking(players)
- local a, b, c = {}, {}, table.copy(players)
- while (sum(a) >= sum [b] and #b < #players / 2)
- table.insert(b, c[#c])
- c.remove(c, #c)
- if sum(b) > sum(a) then
- a, b = b, a
- end
- a = a + copy[1]
- return a, b
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement