Pergunta

Idea is simple. Function needs one argument which is the players amount. It generates the graph where each player is placed versus another one (screen included). If players are even, rounds equals to players-1 else, it equals players.

screen included (http://i.stack.imgur.com/k7xAZ.png)

I've noticed that the best way to do the pairing is to change order of numbers (source).

I can't find any solution to make it work with uneven player's count. Any suggestions are welcomed, as I really need this algorithm to start working ASAP. It looks simple, and won't take much coding, so it's not an issue. I just need the tip.

Foi útil?

Solução

If you have an odd number of players, add a dummy player. Whoever plays the dummy player in a certain round, doesn't compete in that round.

You can even see that in your example image where player 6 is the dummy. The left table is obtained by skipping all matches versus number 6.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top