Games::Tournament::Swiss::Procedure::Dummy - A brain-dead pairing algorithm
$tourney = Games::Tournament::Swiss->new( rounds => 2, entrants => [ $a, $b, $c ] ); %groups = $tourney->formBrackets; $pairing = $tourney->pairing( \%groups ); @pairs = $pairing->matchPlayers;
A test module swappable in to allow testing the non-Games::Tournament::Procedure parts of Games::Tournament::Swiss
$pairing = Games::Tournament::Swiss::Procedure::Dummy->new(TODO \@groups );
Creates a stupid algorithm object that on matchPlayers will just pair the nth player with the n+1th in each score group, downfloating the last player if the number in the bracket is odd, ignoring the FIDE Swiss Rules. You can swap in this module in your configuration file, instead of your real algorithm to test the non-algorithm parts of your program are working.
@pairs = $pairing->matchPlayers;
Run a brain-dead algorithm that instead of pairing the players according to the rules creates matches between the nth and n+1th player of a bracket, downfloating the last player of the group if the number of players is odd. If there is an odd number of total players, the last gets a Bye.
$pairing->brackets
Gets/sets all the brackets which we are pairing, as an anonymous array of score group (bracket) objects. The order of this array is important. The brackets are paired in order.
$pairing->round
What round is this round's results we're pairing on the basis of?
$group->matches
Gets/sets the matches which we have made.
Dr Bean, <drbean, followed by the at mark (@), cpan, then a dot, and finally, org>
<drbean, followed by the at mark (@), cpan, then a dot, and finally, org>
Please report any bugs or feature requests to bug-games-tournament-swiss at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Games-Tournament-Swiss. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-games-tournament-swiss at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Games::Tournament::Swiss
You can also look for information at:
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Games-Tournament-Swiss
CPAN Ratings
http://cpanratings.perl.org/d/Games-Tournament-Swiss
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Games-Tournament-Swiss
Search CPAN
http://search.cpan.org/dist/Games-Tournament-Swiss
See http://www.fide.com/official/handbook.asp?level=C04 for the FIDE's Swiss rules.
Copyright 2006 Dr Bean, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Games::Tournament::Swiss, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Games::Tournament::Swiss
CPAN shell
perl -MCPAN -e shell install Games::Tournament::Swiss
For more information on module installation, please visit the detailed CPAN module installation guide.