addPiece [line 931]
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 998]
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 980]
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 878]
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 989]
false inRepetitionDraw(
)
|
|
Repetition draw is not allowed in crazyhouse
Overrides
Games_Chess::inRepetitionDraw() (Determine whether draw by repetition has happened)
isBishop [line 681]
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]
Overrides
Games_Chess_Standard::isBishop() (Determine whether a piece name is a bishop)
Parameters:
isKing [line 652]
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]
Overrides
Games_Chess_Standard::isKing() (Determine whether a piece name is a king)
Parameters:
isPawn [line 711]
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]
Overrides
Games_Chess_Standard::isPawn() (Determine whether a piece name is a pawn)
Parameters:
isRook [line 696]
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]
Overrides
Games_Chess_Standard::isRook() (Determine whether a piece name is a rook)
Parameters:
moveSAN [line 246]
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 898]
_getAllPieceLocations [line 810]
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 392]
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 596]
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 620]
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 765]
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 790]
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:
_isKnight [line 636]
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:
_isQueen [line 666]
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:
_renderFen [line 830]
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 146]
_squareToPiece [line 367]
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: