Games::SGF::Tournament - Tournament statistics generator
This document describes Games::SGF::Tournament version 1.1
use CGI qw / :html /; use Games::SGF::Tournament; my $t = Games::SGF::Tournament->new(); print html(body($t->scores()));
SGF is acronym for Smart Game File and is a file format used to store game records of two player board games. This module used to collect game information from a set of SGF files and produce HTML tables for creating WWW tournament pages.
Games::SGF::Tournament is a class with following methods:
The constructor. Optional parameters are:
Path to SGF files representing the tournament. Default: '.'.
'.'
Base URL to prefix file names of SGF files. Default: ''.
''
Returns a table of played games in chronological order with hyperlinks to SGF files. Optional parameters are:
The hash reference passed directly to CGI as <table> attributes. Default: { border => '1' }.
<table>
{ border => '1' }
The table caption. Default: 'Played Games'.
'Played Games'
Returns a table of players descending by score. Optional parameters are:
The table caption. Default: 'Scoreboard'.
'Scoreboard'
While opening directory "dir": os-error
Can't open given sgf_dir for reading. Probably it doesn't exist or have inappropriate permissions, see OS error message.
Games::SGF::Tournament requires no configuration files or environment variables.
None reported.
No bugs have been reported.
The class should be compatible to FF[3] and GM[1], only the first game tree per file is significant (mostly because i cannot realise what actually for a collection of games stored in one file). Suggestions welcome.
FF[3]
GM[1]
If two or more players have same score, they positions will be unpredictable. Usually, such a problem on tournaments have to be resolved with the help of other methods os scoring: SOS and so on. That is not implemented yet.
This is my very first object-oriented Perl module, and i will appreciate any suggestions about OO-style.
Please report any bugs or feature requests through the web interface at http://sourceforge.net/tracker/?group_id=143987.
CGI, Smart Game File: http://www.red-bean.com/sgf/.
Al Nikolov <alnikolov@narod.ru>
Copyright (c) 2005, Al Nikolov <alnikolov@narod.ru>. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
To install Games::SGF::Tournament, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Games::SGF::Tournament
CPAN shell
perl -MCPAN -e shell install Games::SGF::Tournament
For more information on module installation, please visit the detailed CPAN module installation guide.