addPiece [line 163]
true|PEAR_Error addPiece(
W|B
$color, K|Q|R|N|P|B
$type, string
$square)
|
|
Add a piece to the chessboard
Overrides
Games_Chess::addPiece() (Add a piece to the chessboard)
Parameters:
blankBoard [line 46]
inCheck [line 404]
string|array|false inCheck(
W|B
$color)
|
|
Determine whether one side's king is in check by the other side's pieces
Parameters:
isBishop [line 780]
boolean isBishop(
string
$piecename)
|
|
Determine whether a piece name is a bishop
This does NOT take an algebraic square as the argument, but the contents of _board[algebraic square]
Parameters:
isKing [line 827]
boolean isKing(
string
$piecename)
|
|
Determine whether a piece name is a king
This does NOT take an algebraic square as the argument, but the contents of _board[algebraic square]
Parameters:
isPawn [line 812]
boolean isPawn(
string
$piecename)
|
|
Determine whether a piece name is a pawn
This does NOT take an algebraic square as the argument, but the contents of _board[algebraic square]
Parameters:
isRook [line 796]
boolean isRook(
string
$piecename)
|
|
Determine whether a piece name is a rook
This does NOT take an algebraic square as the argument, but the contents of _board[algebraic square]
Parameters:
toArray [line 255]
Generate a representation of the chess board and pieces for use as a
direct translation to a visual chess board
Overrides
Games_Chess::toArray() (Generate a representation of the chess board and pieces for use as a direct translation to a visual chess board)
_getAllPieceLocations [line 359]
void _getAllPieceLocations(
W|B
$color)
|
|
Get the location of every piece on the board of color $color
Overrides
Games_Chess::_getAllPieceLocations() (Get the location of every piece on the board of color $color)
Parameters:
_getAllPieceSquares [line 493]
array _getAllPieceSquares(
K|B|N|R|W|P
$piece, W|B
$color, [string
$exclude = null])
|
|
Retrieve the locations of all pieces of the same type as $piece
Parameters:
_getColor [line 873]
Retrieve the color of a piece from its name
Game-specific method of retrieving the color of a piece
Parameters:
_getKing [line 714]
false|string _getKing(
[
$color = null])
|
|
Get the location of the king
assumes valid color input
Parameters:
_getPiece [line 732]
string|array _getPiece(
string
$piecename)
|
|
Get the location of a piece
This does NOT take an algebraic square as the argument, but the contents of _board[algebraic square]
Parameters:
_getPieceTypes [line 897]
Get a list of all pieces on the board organized by the type of piece, and the color of the square the piece is on.
Used to determine basic draw conditions
_getPossibleChecks [line 381]
array _getPossibleChecks(
W|B
$color)
|
|
Used to determine check
Retrieve all of the moves of the pieces matching the color passed in.
Parameters:
_isKnight [line 748]
boolean _isKnight(
string
$piecename)
|
|
Determine whether a piece name is a knight
This does NOT take an algebraic square as the argument, but the contents of _board[algebraic square]
Parameters:
_isQueen [line 764]
boolean _isQueen(
string
$piecename)
|
|
Determine whether a piece name is a queen
This does NOT take an algebraic square as the argument, but the contents of _board[algebraic square]
Parameters:
_renderFen [line 311]
Render the current board position into Farnsworth-Edwards Notation
This method only renders the board contents, not the castling and other information
_setupStartingPosition [line 93]
_squareToPiece [line 468]
false|array _squareToPiece(
string
$square)
|
|
Translate an algebraic coordinate into the color and name of a piece,
or false if no piece is on that square
Parameters:
_takePiece [line 429]
void _takePiece(
string
$piece)
|
|
Mark a piece as having been taken. No validation is performed
Parameters: