addPiece [line 163]
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
Overridden in child classes as:
- Games_Chess_Crazyhouse::inCheck()
- 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]
Overridden in child classes as:
- Games_Chess_Crazyhouse::isBishop()
- Determine whether a piece name is a bishop
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]
Overridden in child classes as:
- Games_Chess_Crazyhouse::isKing()
- Determine whether a piece name is a king
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]
Overridden in child classes as:
- Games_Chess_Crazyhouse::isPawn()
- Determine whether a piece name is a pawn
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]
Overridden in child classes as:
- Games_Chess_Crazyhouse::isRook()
- Determine whether a piece name is a rook
Parameters:
toArray [line 255]
Generate a representation of the chess board and pieces for use as a
direct translation to a visual chess board
Overridden in child classes as:
- Games_Chess_Crazyhouse::toArray()
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]
_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
Overridden in child classes as:
- Games_Chess_Crazyhouse::_getAllPieceSquares()
- Retrieve the locations of all pieces of the same type as $piece
Parameters:
_getColor [line 888]
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
Overridden in child classes as:
- Games_Chess_Crazyhouse::_getKing()
- Get the location of the king
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]
Overridden in child classes as:
- Games_Chess_Crazyhouse::_getPiece()
- Get the location of a piece
Parameters:
_getPieceTypes [line 912]
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
Overridden in child classes as:
- Games_Chess_Crazyhouse::_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 381]
array _getPossibleChecks(
W|B
$color)
|
|
Used to determine check
Retrieve all of the moves of the pieces matching the color passed in.
Overridden in child classes as:
- Games_Chess_Crazyhouse::_getPossibleChecks()
- Used to determine check
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]
Overridden in child classes as:
- Games_Chess_Crazyhouse::_isKnight()
- Determine whether a piece name is a knight
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]
Overridden in child classes as:
- Games_Chess_Crazyhouse::_isQueen()
- Determine whether a piece name is a queen
Parameters:
_renderFen [line 311]
Render the current board position into Forsyth-Edwards Notation
This method only renders the board contents, not the castling and other information
Overridden in child classes as:
- Games_Chess_Crazyhouse::_renderFen()
- Render the current board position into Forsyth-Edwards Notation
_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
Overridden in child classes as:
- Games_Chess_Crazyhouse::_squareToPiece()
- Translate an algebraic coordinate into the color and name of a piece,
Parameters:
_takePiece [line 429]
void _takePiece(
string
$piece)
|
|
Mark a piece as having been taken. No validation is performed
Parameters: