1681-engine / index / balanceTeams
Function: balanceTeams() ​
ts
function balanceTeams(
groups,
teams,
size
): number[][] | null;Defined in: src/net/lobby/Matchmaker.ts:147
Splits groups into teams of exactly size players, parties whole, ratings as even as it can: the largest groups first, each into the team with room whose rating total is lowest. Returns null when the sizes cannot be packed.
Parameters ​
| Parameter | Type |
|---|---|
groups | readonly Ticket[] |
teams | number |
size | number |
Returns ​
number[][] | null