Chess::Piece::Rook - an object representation of a rook in a game of chess
$rook = Chess::Piece::Rook->new("a1", "white", "White Queen's rook"); $true = $rook->can_reach("h1"); $true = $rook->can_reach("a8"); $false = $rook->can_reach("d4");
The Chess module provides a framework for writing chess programs with Perl. This class forms part of that framework, representing a rook in a Chess::Game.
Constructs a new Chess::Piece::Rook. Requires two scalar parameters containing the initial square and color of the piece. Optionally takes a third parameter containing a description of the piece.
There are no class methods for this class.
Overrides base class version. Returns a list of squares that this pawn can reach from its current position. See "reachable_squares()" in Chess::Piece for more details on this method.
This module produces no warning messages. See DIAGNOSTICS in Chess::Board or DIAGNOSTICS in Chess::Piece for possible errors or warnings the program may produce.
Please report any bugs to the author.
Brian Richardson <bjr@cpan.org>
Copyright (c) 2002, 2005 Brian Richardson. All rights reserved. This module is Free Software. It may be modified and redistributed under the same terms as Perl itself.
4 POD Errors
The following errors were encountered while parsing the POD:
'=item' outside of any '=over'
You forgot a '=back' before '=head2'
You forgot a '=back' before '=head1'
To install Chess, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Chess
CPAN shell
perl -MCPAN -e shell install Chess
For more information on module installation, please visit the detailed CPAN module installation guide.