NAME

Games::Tournament::Swiss::Procedure::Dummy - A brain-dead pairing algorithm

SYNOPSIS

 $tourney = Games::Tournament::Swiss->new( rounds => 2, entrants => [ $a, $b, $c ] );
 %groups = $tourney->formBrackets;
 $pairing = $tourney->pairing( \%groups );
 @pairs = $pairing->matchPlayers;

DESCRIPTION

A test module swappable in to allow testing the non-Games::Tournament::Procedure parts of Games::Tournament::Swiss

METHODS

new

 $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.

matchPlayers

 @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.

brackets

        $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.

round

        $pairing->round

What round is this round's results we're pairing on the basis of?

matches

        $group->matches

Gets/sets the matches which we have made.

AUTHOR

Dr Bean, <drbean, followed by the at mark (@), cpan, then a dot, and finally, org>

BUGS

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.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc Games::Tournament::Swiss

You can also look for information at:

ACKNOWLEDGEMENTS

See http://www.fide.com/official/handbook.asp?level=C04 for the FIDE's Swiss rules.

COPYRIGHT & LICENSE

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.