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


Chess-Rep-Coverage documentation  | view source Contained in the Chess-Rep-Coverage distribution.

Index


NAME

Top

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

SYNOPSIS

Top

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

DESCRTIPTION

Top

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.

METHODS

Top

new()

Return a new Chess::Coverage object as a subclass of Chess::Rep.

coverage()

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

TO DO

Top

Get Chess::Rep to return the indices of the attackers.

Make additional methods (or plugins) produce images and animations of the coverage.

SEE ALSO

Top

Chess::Rep

AUTHOR

Top

Gene Boggs <gene@cpan.org>

COPYRIGHT

Top


Chess-Rep-Coverage documentation  | view source Contained in the Chess-Rep-Coverage distribution.