The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Games::Go::AGA::DataObjects::Tournament - models AGA register.tde file information

VERSION

version 0.152

SYNOPSIS

    use Games::Go::AGA::DataObjects::Tournament;
    my $tournament = Games::Go::AGA::DataObjects::Tournament->new();

    my $rounds = $tournament->rounds;  # ref to the array of rounds

DESCRIPTION

Games::Go::AGA::DataObjects::Tournament models the information about a American Go Association (AGA) go tournament.

Games::Go::AGA::DataObjects::Tournament isa Games::Go::AGA::DataObjects::Register object with additional methods:

$tournament->add_round($round_num, $round, [ 'replace' ] )

Adds a Games::Go::AGA::DataObjects::Round to the tournament as number $round_num. Throws an exception if $round_num - 1 doesn't exist yet. If 'replace' is defined, all existing games from this $round_num are removed from the Games::Go::AGA::DataObjects::Players.

$tournament->rounds

Returns the number of rounds (round 0 never exists and is not counted).

$tournament->round($round_num)

Returns the Games::Go::AGA::DataObjects::Round object for round $round_num.

$tournament->send_to_AGA( [ $fd ] )

Format the tournament data for sending to the AGA (ratings@usgo.org).

If $fd is defined, it is printed to. If not, it is created as a new IO::String object. $<fd> is returned, so if $fd is an IO::String object, the caller can acquire the string using $fd-string_ref> (see perldoc IO::String).

SEE ALSO

Games::Go::AGA
Games::Go::AGA::DataObjects
Games::Go::AGA::DataObjects::Register
Games::Go::AGA::DataObjects::Game
Games::Go::AGA::DataObjects::Player
Games::Go::AGA::Parse
Games::Go::AGA::Gtd

AUTHOR

Reid Augustin <reid@hellosix.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2016 by Reid Augustin.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.