Chess::Piece::Bishop - an object representation of a bishop in a game of chess
$bishop = Chess::Piece::Bishop->new("f1", "white", "White King's bishop"); $true = $bishop->can_reach("c4"); $true = $bishop->can_reach("h3"); $false = $bishop->can_reach("d4");
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.
Constructs a new Chess::Piece::Bishop. 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.
Please report any bugs to the author.
Brian Richardson <firstname.lastname@example.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.