NAME
Chess::Rep::Coverage - Expose chess ply potential energy
SYNOPSIS
use Chess::Rep::Coverage;
$g = Chess::Rep::Coverage->new();
$c = $g->coverage();
warn Data::Dumper->new([$c])->Indent(1)->Terse(1)->Sortkeys(1)->Dump;
DESCRIPTION
This module exposes the "potential energy" of a chess ply by returning a hash reference of the board positions, pieces and their "attack or protection status."
METHODS
new()
Return a new Chess::Coverage
object.
coverage()
$x = Chess::Rep::Coverage::coverage();
Return a data structure, keyed on board position, showing
occupant => Human readable string of the piece name
color => Color name of the occupant
index => The C<Chess::Rep/Position> board position index
move => List of positions that are legal moves by the occupying piece
protects => True (1) if the occupying piece is protected by its own color
threatens => True (1) if the occupying piece is threatened by the opponent
TO DO
Make images and animations of coverage(s).
SEE ALSO
* The code in the eg/
and t/
directories.