Games::Go::Diagram

Games::Go::Diagram is a Perl extension to make go diagrams similar to printed diagrams.
Download

Games::Go::Diagram Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Reid Augustin
  • Publisher web site:
  • http://search.cpan.org/~reid/Games-Go-Sgf2Dg-4.211/Diagram.pm

Games::Go::Diagram Tags


Games::Go::Diagram Description

Games::Go::Diagram is a Perl extension to make go diagrams similar to printed diagrams. Games::Go::Diagram is a Perl extension to make go diagrams similar to printed diagrams.SYNOPSIS use Games::Go::Diagram my $diagram = Games::Go::Diagram->new (options); $diagram->put($coords, 'white' | 'black', ? number ?); $diagram->mark($coords); $diagram->label($coords, 'a'); $diagram->get($coords); my $new_diagram = $diagram->next;A Games::Go::Diagram object represents a diagram similar to those seen in go textbooks and magazines. Most of the properties defined in SGF FF are supported.The caller puts 'white' or 'black' stones (possibly numbered), on the intersection selected by $coords. The caller may mark and label intersections and stones.put, mark, label and property are 'actions'. Actions are provisional until the node method is called. If any provisioanl actions cause a conflict, none of the actions associated with the node are applied, and the node method either calls a user-defined callback function, or returns an error.When a conflict occurs, the caller should dispose of the current Diagram by getting the information from each intersection and doing something (like printing it). Then the caller converts the Diagram to the starting point of the next diagram by calling the clear method. Alternatively, the caller may save the current Diagram and create the starting point for the next diagram by calling the next method. clear and next may also be called at arbitrary times (for example, to launch a variation diagram).'coords' may be any unique identifier for the intersection. For example: my $coords = 'qd'; # SGF format my $coords = 'a4'; # NNGS / IGS style coordinates my $coords = "$x,$y"; # real coordinates my $coords = 'George'; # as long as there's only one George Requirements: · Perl


Games::Go::Diagram Related Software