Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • BackTrack 5 R2
  • Wine 1.4 / 1.5.5
  • Mozilla Firefox 12...
  • Ubuntu 11.04
  • Angry Birds 1.1.2.1
  • Ubuntu 10.04.4 LTS
  • Linux Kernel 3.4
  • Ubuntu Manual 10.10
  • Adobe Flash Player...
  • Pidgin 2.10.4
  • Home > Linux > Programming > Libraries

    Chess::Pgn 0.03

    Download button

    No screenshots available
    Downloads: 501  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Gilles Maire | More programs
    Perl Artistic License / FREE
    September 18th, 2007, 10:05 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    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 :

    [Event "?"]
    [Site "?"]
    [Date "????.??.??"]
    [Round "?"]
    [White "Greco"]
    [Black "NN"]
    [Result "1-0"]
    [ECO "C57"]
    [WhiteElo "2010"]
    [BlackElo "1620"]
    [PlyCount "17"]

    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

    [Event "?"]
    [Site "corr CS ch 22 (FS"]
    [Date "????.??.??"]
    [Round "12.0"]
    [White "Rosenzweig V"]
    [Black "Necesany Z"]
    [Result "1/2-1/2"]
    [ECO "C55"]
    [WhiteElo "2410"]
    [BlackElo "2620"]
    [PlyCount "22"]

    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/2

    With 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



    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    chess PGN | PGN manipulation | Perl module | chess | PGN | Perl



    HTML code for linking to this page:


    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM