Dr Bean > Games-Tournament-Swiss > Games::Tournament::Swiss::Config

Download:
Games-Tournament-Swiss-0.18.tar.gz

Dependencies

Annotate this POD

Website

CPAN RT

New  7
Open  10
Stalled  1
View/Report Bugs
Module Version: 0.18   Source  

NAME ^

Games::Tournament::Swiss::Config - Swiss Competition Configuration

SYNOPSIS ^

    use constant ROLES => @Games::Tournament::Swiss::Config::roles = qw/Black White/;
    use constant ROLES => @Games::Tournament::Swiss::Config::ROLES;
    $Games::Tournament::Swiss::Config::firstRound = 11;

DESCRIPTION ^

Actually, a swiss tournament is not just one kind of tournament, but a whole genre of tournaments. If you are using Games::Tournament::Swiss for other than chess tournaments, where the players take black and white roles, and score 0,0.5, or 1, for example, you probably want to configure it. You also might want to start swiss pairing at a random round in the tournament, in which case you will set firstround.

The roles, scores, firstround, algorithm methods in this module are here just to stop perl warning about 'only one use, possible typo' warnings, with the use of fully qualified Games::Tournament::Swiss::Config package variables. (Is that actually true? Anyway I want the methods (class and object) to return values, default and assigned.)

METHODS ^

new

Getter/setter of the genre of competition, eg chess, basketball, football, school exam, etc, the tournament is being held as.

frisk

Die if the configuration contains anything but [A-Za-z0-9:,.]

roles

Getter/setter of the roles the 2 players take, eg Black, White, or Home, Away. The default is White, Black. Both object and class method.

scores

Getter/setter of the scores the 2 players can get, eg win: 1, loss: 0, draw: 0.5, absent: 0, bye: 1, which is the default. Both object and class method.

abbreviation

Getter/setter of the abbreviations used and their full translations. The default is W: White, B: Black, 1: Win, 0: Loss, '0.5': Draw, '=': Draw. Both object and class method. Also Absolute, Strong and Mild preferences, and Down, Up, and Not floats.

algorithm

Getter/setter of the algorithm by which swiss pairing is carried out. There is no default. Pass a name as a string. I recommend Games::Tournament::Swiss::Procedure::FIDE. Make sure something is set.

firstround

Getter/setter of the first round in which swiss pairing started. Perhaps some other pairing method was used in rounds earlier than this. The default is 1. Both object and class method.

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::Config

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.

syntax highlighting: