addPiece [line 891]
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_Standard::addPiece() (Add a piece to the chessboard)
Parameters:
blankBoard [line 104]
inCheck [line 838]
string|array|false inCheck(
W|B
$color)
|
|
Determine whether one side's king is in check by the other side's pieces
Overrides
Games_Chess_Standard::inCheck() (Determine whether one side's king is in check by the other side's pieces)
Parameters:
moveSAN [line 213]
true|PEAR_Error moveSAN(
string
$move)
|
|
Make a move from a Standard Algebraic Notation (SAN) format
SAN is just a normal chess move like Na4, instead of the English Notation, like NR4
Overrides
Games_Chess::moveSAN() (Make a move from a Standard Algebraic Notation (SAN) format)
Parameters:
toArray [line 858]
_getAllPieceLocations [line 770]
void _getAllPieceLocations(
W|B
$color)
|
|
Get the location of every piece on the board of color $color
Overrides
Games_Chess_Standard::_getAllPieceLocations() (Get the location of every piece on the board of color $color)
Parameters:
_getAllPieceSquares [line 369]
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
Overrides
Games_Chess_Standard::_getAllPieceSquares() (Retrieve the locations of all pieces of the same type as $piece)
Parameters:
_getKing [line 573]
false|string _getKing(
[
$color = null])
|
|
Get the location of the king
assumes valid color input
Overrides
Games_Chess_Standard::_getKing() (Get the location of the king)
Parameters:
_getPiece [line 591]
string|array _getPiece(
string
$piece)
|
|
Get the location of a piece
This does NOT take an algebraic square as the argument, but the contents of _board[algebraic square]
Overrides
Games_Chess_Standard::_getPiece() (Get the location of a piece)
Parameters:
_getPieceTypes [line 725]
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
Overrides
Games_Chess_Standard::_getPieceTypes() (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.)
_getPossibleChecks [line 750]
array _getPossibleChecks(
W|B
$color)
|
|
Used to determine check
Retrieve all of the moves of the pieces matching the color passed in.
Overrides
Games_Chess_Standard::_getPossibleChecks() (Used to determine check)
Parameters:
_isBishop [line 639]
boolean _isBishop(
string
$piece)
|
|
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:
_isKnight [line 607]
boolean _isKnight(
string
$piece)
|
|
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]
Overrides
Games_Chess_Standard::_isKnight() (Determine whether a piece name is a knight)
Parameters:
_isPawn [line 671]
boolean _isPawn(
string
$piece)
|
|
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:
_isQueen [line 623]
boolean _isQueen(
string
$piece)
|
|
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]
Overrides
Games_Chess_Standard::_isQueen() (Determine whether a piece name is a queen)
Parameters:
_isRook [line 655]
boolean _isRook(
string
$piece)
|
|
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:
_renderFen [line 790]
Render the current board position into Farnsworth-Edwards Notation
This method only renders the board contents, not the castling and other information
Overrides
Games_Chess_Standard::_renderFen() (Render the current board position into Farnsworth-Edwards Notation)
_setupStartingPosition [line 113]
_squareToPiece [line 344]
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
Overrides
Games_Chess_Standard::_squareToPiece() (Translate an algebraic coordinate into the color and name of a piece,)
Parameters: