NAME

Chess::Rep::Coverage::Imager - Expose chess ply potential energy with Imager

SYNOPSIS

use Chess::Rep::Coverage::Imager;

my $g = Chess::Rep::Coverage::Imager->new();
$g->write('board', 'png');

$g->set_from_fen('8/8/8/3pr3/4P3/8/8/8 w ---- - 0 1');
$g->coverage(); # Recalculate coverage status
$g->board(); # Re-render the board.
$g->write('foo', 'png');

DESCRIPTION

This module exposes the "potential energy" of a chess ply by writing an Imager graphic of the board positions, pieces and their "attack or protection status."

METHODS

new()

Return a new Chess::Coverage::Imager object.

write()

$g->write('my-board', 'png');

board()

$board = $g->board();

Return an Imager board layout with threats, protections and move statuses indicated by concentric colored circles and squares.

For example, the FEN sequence at the link under "SEE ALSO" graphically renders as:

Starting positions

Move 1

Move 2

Move 3


How about an animation of the famous "Immortal Game" between Garry Kasparov vs. Veselin Topalov, in 1999?

The Immortal Game

SEE ALSO

* The code in the examples/ and t/ directories.

* Chess::Rep::Coverage

* Imager

* http://en.wikipedia.org/wiki/Forsyth-Edwards_Notation