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

use Chess::Rep::Coverage; $g = Chess::Rep::Coverage->new(); $c = $g->coverage();

This module exposes the "potential energy" of a chess ply by returning a hash reference of the board positions, pieces and their "attack status."
* This module was a lot more complicated and slower, in the past. Modern chess packages have allowed me to simplify this over time.
* Previous versions of this module listed the board positions that threatened or protected a given position. This module does the reverse (for the moment) and shows if positions are threatened or protected with a simple true value.

Return a new Chess::Coverage object.
Return a data structure, keyed on board position, showing
occupant => Human readable string of the piece name and color index => The C<Chess::Rep/Position> board position index. move => List of positions that are legal moves by the occupying piece protected => True (1) if the occupying piece is protected by its own color threatened => True (1) if the occupying piece is threatened by the opponent

Get Chess::Rep to return the indices of the attackers.
Make additional methods (or plugins) produce images and animations of the coverage.


Gene Boggs <gene@cpan.org>

Copyright 2007-2008, Gene Boggs.
This code is licensed under the same terms as Perl itself.