Chess::Pgn

Chess::Pgn is a Perl extension for manipulation of chess PGN format.
Download

Chess::Pgn Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Gilles Maire
  • Publisher web site:
  • http://search.cpan.org/~maire/Chess-Pgn-0.03/Pgn.pm

Chess::Pgn Tags


Chess::Pgn Description

Chess::Pgn is a Perl extension for manipulation of chess PGN format. Chess::Pgn is a Perl extension for manipulation of chess PGN format. PGN is for Portable Game Notation and follow the Portable Game Notation Specification and Implementation Guide revised 1994.03.12. You can find it at http://members.nbci.com/sghudson/standard.txt.The goal of this module is not to play chess but to help to manipulate PGN File.A PGN file is like this : 1.e4 e5 2.Nf3 Nc6 3.Bc4 Nf6 4.Ng5 d5 5.exd5 Nxd5 6.Nxf7 Kxf7 7.Qf3+ Ke6 8.Nc3 Ne7 9.O-O c6 10.Re1 Bd7 11.d4 Kd6 12.Rxe5 Ng6 13.Nxd5 Nxe5 14.dxe5+ Kc5 15.Qa3+ Kxc4 16.Qd3+ Kc5 17.b4# 1-0 1.e4 e5 2.Nf3 Nc6 3.Bc4 Nf6 4.O-O Be7 5.Nc3 Nxe4 6.Nxe4 d5 7.d4 dxc4 8.d5 Nd4 9.Nxd4 Qxd5 10.Nf3 Qxe4 11.Re1 Qc6 12.Nxe5 Qf6 13.Bd2 O-O 14.Bc3 Bc5 15.Re2 Qf5 16.Qd5 Bd6 17.Rae1 Be6 18.Qxb7 f6 19.Nc6 Bd5 20.Rd2 Bxg2 21.Rxd6 Bxc6 22.Rxc6 Qg4+ 1/2-1/2With Chess:Pgn you will find a game by $game->date or $game->game. For our last example we will have $game->date : "????.??.??" $game->game : "1.e4 e5 2.Nf3 Nc6 3.Bc4 Nf6 4.Ng5 d5 5.exd5 Nxd5 6.Nxf7 Kxf7 7.Qf3+ Ke6 8.Nc3 Ne7 9.O-O c6 10.Re1 Bd7 11.d4 Kd6 12.Rxe5 Ng6 13.Nxd5 Nxe5 14.dxe5+ Kc5 15.Qa3+ Kxc4 16.Qd3+ Kc5 17.b4# 1-0"The module provide a good set of tools to modify PGN File but you will have to make yourself the while :)SYNOPSIS use Chess::Pgn; $p = new Chess::Pgn("2KTSDEF.PGN" ) || die "2KTSDEF.PGN not found"; while ( $p->ReadGame ) { print $p->white ,"",$p->black, "n"; } $p->quit(); $p->white(Kouatly); $p->black(Kasparov);Requirements:· Perl Requirements: · Perl


Chess::Pgn Related Software