Subject: | pairingtable, pairtable2yaml, pair with odd number of players |
Date: | Wed, 19 Sep 2007 10:44:00 +0200 |
To: | bug-Games-Tournament-Swiss [...] rt.cpan.org |
From: | Christian Bartolomaeus <bartolin [...] gmx.de> |
Hi,
it seems to me that the sequenze 'pairingtable' -> 'pairtable2yaml' ->
'pair' doesn't work when there is an odd number of players.
Let's assume, we have five players, which are paired in the first
round:
3-1 result: Draw
2-4 result: Draw
5 Bye
Running 'pairingtable' on gets (correctely):
Show quoted text
> Round 2 Pairing Groups
> ------------------------------------------------------------
> Place No Opponents Roles Float Score
> 1
> 5 - - D 1
> 2-5
> 1 4 W 0.5
> 2 3 B 0.5
> 3 2 W 0.5
> 4 1 B 0.5
Now using 'pairtable2yaml' to generate pairtable.yaml, the script
seems to ignore player 5:
Show quoted text> ---
> floats:
> 1:
> - ~
> - ~
> 2:
> - ~
> - ~
> 3:
> - ~
> - ~
> 4:
> - ~
> - ~
> opponents:
> 1:
> - 4
> 2:
> - 3
> 3:
> - 2
> 4:
> - 1
> roles:
> 1:
> - White
> 2:
> - Black
> 3:
> - White
> 4:
> - Black
> score:
> 1: 0.5
> 2: 0.5
> 3: 0.5
> 4: 0.5
Running 'pair', it complains about bad opponent for player 5:
Show quoted text> Use of uninitialized value in hash element at pair line 107.
> Use of uninitialized value in numeric ne (!=) at pair line 107.
> Use of uninitialized value in concatenation (.) or string at pair line 107.
> Use of uninitialized value in concatenation (.) or string at pair line 107.
> Player 5's opponent is , but 's opponent isn't 5 at pair line 107.
Everything works fine when I use 'pairstately' instead of those
sequence. Therefore I use 'pairstately' again for my web frontend
again.
But I thought, I could report this problem, nevertheless.
Best regards
Christian
Message body not shown because it is not plain text.