addPiece [line 881]
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]
in50MoveDraw [line 948]
50 move draw is not allowed in crazyhouse
Overrides
Games_Chess::in50MoveDraw() (Determine whether any pawn move or capture has occurred in the past 50 moves)
inBasicDraw [line 930]
Basic draw is impossible in crazyhouse, because it is always possible
to place another piece
Overrides
Games_Chess::inBasicDraw() (Determine the presence of a basic draw as defined by FIDE rules)
inCheck [line 828]
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:
inRepetitionDraw [line 939]
false inRepetitionDraw(
)
|
|
Repetition draw is not allowed in crazyhouse
Overrides
Games_Chess::inRepetitionDraw() (Determine whether draw by repetition has happened)
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 848]
_getAllPieceLocations [line 760]
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 359]
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 563]
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 581]
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 715]
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 740]
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 629]
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 597]
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 661]
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 613]
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 645]
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 780]
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 334]
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: