Games::Go::SGF 0.01
Games::Go::SGF is a Perl module that can parse and dissect Standard Go Format files. SYNOPSIS use Games::Go::SGF; my $sgf
|
|||||||||||||||||||
Games::Go::SGF is a Perl module that can parse and dissect Standard Go Format files.
SYNOPSIS
use Games::Go::SGF;
my $sgf = new Games::Go::SGF($sgfdata);
print "Game played on ".$sgf->date."n";
print $sgf->white. " (W) vs. ".$sgf->black." (B)n";
print "Board size: ".$sgf->size.". Komi: ".$sgf->komi."n";
while ($move = $sgf->move($move_no++)) {
print "$move_no: ".$move->move,"n";
}
This is a very simple SGF file parser, of currently limited functionality. It can read and step through SGF files, follow variations, and so on. It's good enough for getting simple statistics about games of Go, and building up Games::Go::Board objects representing games stored as SGF.
$sgf->move returns either a normal Games::Go::SGF::Node or a Games::Go::SGF::Variation object. They behave exactly the same, but the variation object has the additional methods mainline() to get the main line of the game, variation($n) to get the first node in the n'th variation, and variations to retrieve an array of variations. $variation->move will, by default, follow the mainline.
Requirements:
tags
Download Games::Go::SGF 0.01
Authors software
|
|
|
|
|
|
|
|
|
|
Similar software
|
|
|
|
|
|
|
|
|
|
|
|
Other software in this category
|
|
|
|
|
|
|
|
|
|
Featured Software
jEdit 4.3 pre8
jEdit is an Open Source text editor written in Java
Opera 9.02
Surf the Internet in a safer, faster, and easier way with Opera browser
GNU Aspell 0.60.4
GNU Aspell is a Free and Open Source spell checker designed to eventually replace Ispell
- Communications
- Database
- Desktop Environment
- Games
- Internet
- Multimedia
- Office
- Programming
- Science and Engineering
- System
- Text Editing&Processing
