NAME
Chess::Piece::Queen - an object representation of a queen in a game of chess
SYNOPSIS
$queen = Chess::Piece::Queen->new("d1", "white", "White Queen");
$true = $queen->can_reach("d8");
$true = $queen->can_reach("h1");
$true = $queen->can_reach("h5");
$true = $queen->can_reach("a4");
$false = $queen->can_reach("e4");
DESCRIPTION
The Chess module provides a framework for writing chess programs with Perl. This class forms part of that framework, representing a bishop in a Chess::Game.
METHODS
Construction
- new()
-
Constructs a new Chess::Piece::Queen. Requires two scalar parameters containing the initial square and color of the piece. Optionally takes a third parameter containing a description of the piece.
Class methods
There are no class methods for this class.
Object methods
- can_reach()
-
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.
DIAGNOSTICS
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.
BUGS
Please report any bugs to the author.
AUTHOR
Brian Richardson <bjr@cpan.org>
COPYRIGHT
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:
- Around line 24:
'=item' outside of any '=over'
- Around line 30:
You forgot a '=back' before '=head2'
- Around line 36:
'=item' outside of any '=over'
- Around line 42:
You forgot a '=back' before '=head1'