Chess::Game

Description

Chess::Game is a class to record and validate the moves of a game of chess. SYNOPSIS use Chess::Game; $game = Chess::Game->new(); $clone = $game->clone(); $move = $game->make_move("e2", "e4"); $move_c = $clone->make_move("e2", "e4"); $true = ($move->get_piece() ne $move_c->get_piece()); $move = $game->delete_move(); ... while (!defined($result = $game->result())) { # get a move $move = $game->make_move($sq1, $sq2); if (!defined($move)) { print $game->get_message(); } } if ($result == 1) { print "White wins!n"; } elsif ($result == 0) { print "Draw!n" } else { print "Black wins!n"; } The Chess module provides a framework for writing chess programs with Perl. This class forms part of that framework, providing move validation for all moves recorded using the Chess::Game class. The Game contains a Chess::Board, 32 Chess::Pieces and a Chess::Game::MoveList that contains a series of Chess::Game::MoveListEntrys that record the exact state of the game as it progresses. Moves can be taken back one-at-a-time to allow for simple movelist manipulation..

Published By:Brian Richardson

License Type:Freeware

Date Added:22 October, 2010

Version:0.6.0

Price:Free

Downloads:70

Size:21.5 KB

Platform: Macintosh

What people say
- required fields
     
Related Downloads

Chess::Game::MoveList is a specialized list class for recording the moves of a Chess::Game.

DateSep 30, 2010

AuthorBrian Richardson

Size21.5 KB

LicenseFreeware

PriceFree

PlatformLinux

CategoryLinux Programming

IRC-Chess project is a 2-player chess game for IRC which turns a computer into an IRC chess bot. It consists of a Java chess server, with frontend scripts to convert an IRC client into a chess bot.

DateOct 20, 2010

Authorkodge

Size60.4 KB

LicenseFreeware

PriceFree

PlatformLinux

CategoryLinux Games

Chessweb project is a pure Java servlet implementation of a two-player chess game. Chessweb is a J2EE chess game Website. It is a pure Java servlet implementation of a two-player chess game.

DateOct 28, 2010

AuthorMatthew Smalley

Size0

LicenseFreeware

PriceFree

PlatformLinux

CategoryLinux Internet

Games::Chess Perl module represent chess positions and games.

DateOct 25, 2010

AuthorGareth Rees

Size49.2 KB

LicenseFreeware

PriceFree

PlatformLinux

CategoryLinux Programming

Chess::PGN::Parse is a Perl module that reads and parses PGN (Portable Game Notation) Chess files. SYNOPSIS use Chess::PGN::Parse; use English qw( -no_match_vars ); my $pgnfile = "kk_2001.

DateOct 28, 2010

AuthorGiuseppe Maxia

Size26.6 KB

LicenseFreeware

PriceFree

PlatformLinux

CategoryLinux Programming