Games_Chess
[ class tree: Games_Chess ] [ index: Games_Chess ] [ all elements ]

Class: Games_Chess_testStandard

Source Location: /Games_Chess-1.0.1/tests/Games_Chess/parseFen/setup.php.inc

Class Overview

Games_Chess
   |
   --Games_Chess_Standard
      |
      --Games_Chess_testStandard

Standard chess game


Author(s):

Variables

Methods


Inherited Variables

Inherited Methods

Class: Games_Chess_Standard

Games_Chess_Standard::addPiece()
Add a piece to the chessboard
Games_Chess_Standard::blankBoard()
Set up a blank chess board
Games_Chess_Standard::inCheck()
Determine whether one side's king is in check by the other side's pieces
Games_Chess_Standard::isBishop()
Determine whether a piece name is a bishop
Games_Chess_Standard::isKing()
Determine whether a piece name is a king
Games_Chess_Standard::isPawn()
Determine whether a piece name is a pawn
Games_Chess_Standard::isRook()
Determine whether a piece name is a rook
Games_Chess_Standard::toArray()
Generate a representation of the chess board and pieces for use as a
Games_Chess_Standard::_getAllPieceLocations()
Get the location of every piece on the board of color $color
Games_Chess_Standard::_getAllPieceSquares()
Retrieve the locations of all pieces of the same type as $piece
Games_Chess_Standard::_getColor()
Retrieve the color of a piece from its name
Games_Chess_Standard::_getKing()
Get the location of the king
Games_Chess_Standard::_getPiece()
Get the location of a piece
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.
Games_Chess_Standard::_getPossibleChecks()
Used to determine check
Games_Chess_Standard::_isKnight()
Determine whether a piece name is a knight
Games_Chess_Standard::_isQueen()
Determine whether a piece name is a queen
Games_Chess_Standard::_renderFen()
Render the current board position into Forsyth-Edwards Notation
Games_Chess_Standard::_setupStartingPosition()
Set up a starting position for a new chess game
Games_Chess_Standard::_squareToPiece()
Translate an algebraic coordinate into the color and name of a piece,
Games_Chess_Standard::_takePiece()
Mark a piece as having been taken. No validation is performed

Class: Games_Chess

Games_Chess::addPiece()
Add a piece to the chessboard
Games_Chess::blankBoard()
Create a blank chessboard with no pieces on it
Games_Chess::canCastleKingside()
Determine legality of kingside castling
Games_Chess::canCastleQueenside()
Determine legality of queenside castling
Games_Chess::commitTransaction()
Remove any possibility of undo.
Games_Chess::factory()
Games_Chess::gameOver()
Games_Chess::getDiagonalColor()
Games_Chess::getMessage()
Get an error message from the code
Games_Chess::getMoveList()
Get the list of moves in Standard Algebraic Notation
Games_Chess::getPieceLocations()
Get the location of all pieces on the board of a certain color
Games_Chess::getPossibleBishopMoves()
Get all legal Bishop moves (checking of the king is not taken into account)
Games_Chess::getPossibleKingMoves()
Get all legal King moves (checking of the king is not taken into account)
Games_Chess::getPossibleKnightMoves()
Get all legal Knight moves (checking of the king is not taken into account)
Games_Chess::getPossibleMoves()
Get a list of all possible theoretical squares a piece of this nature and color could move to with the current board and game setup.
Games_Chess::getPossiblePawnMoves()
Get all legal Pawn moves (checking of the king is not taken into account)
Games_Chess::getPossibleQueenMoves()
Get all legal Queen moves (checking of the king is not taken into account)
Games_Chess::getPossibleRookMoves()
Get all legal Rook moves (checking of the king is not taken into account)
Games_Chess::getState()
Get the current state of the chess game
Games_Chess::in50MoveDraw()
Determine whether any pawn move or capture has occurred in the past 50 moves
Games_Chess::inBasicDraw()
Determine the presence of a basic draw as defined by FIDE rules
Games_Chess::inCheckMate()
Determine whether a side is in checkmate
Games_Chess::inDraw()
Determines the presence of a forced draw
Games_Chess::inRepetitionDraw()
Determine whether draw by repetition has happened
Games_Chess::inStaleMate()
Determine whether a side is in stalemate
Games_Chess::isError()
Determines whether the data returned from a method is a PEAR-related
Games_Chess::isPromoteMove()
Determine whether moving a piece from one square to another requires
Games_Chess::moveSAN()
Make a move from a Standard Algebraic Notation (SAN) format
Games_Chess::moveSquare()
Move a piece from one square to another, and mark the old square as empty
Games_Chess::raiseError()
Games_Chess::renderFen()
render the FEN notation for the current board
Games_Chess::resetGame()
Create a new game with the starting position, or from the position specified by $fen
Games_Chess::rollbackTransaction()
Undo any changes to state since startTransaction() was first used
Games_Chess::setState()
Set the state of the chess game
Games_Chess::startTransaction()
Begin a chess piece transaction
Games_Chess::toArray()
Generate a representation of the chess board and pieces for use as a direct translation to a visual chess board
Games_Chess::toMove()
Games_Chess::_convertSquareToSAN()
Convert a starting and ending algebraic square into SAN
Games_Chess::_getAllPieceLocations()
Get the location of every piece on the board of color $color
Games_Chess::_getCastleSquares()
Get a list of all the squares a king could castle to on an empty board
Games_Chess::_getDiagonalColor()
Return the color of a square (black or white)
Games_Chess::_getKingSquares()
Get a list of all the squares a king could move to on an empty board
Games_Chess::_getKnightSquares()
Get all the squares a knight could move to on an empty board
Games_Chess::_getQueenSquares()
Get all the squares a queen could go to on a blank board
Games_Chess::_getRookSquares()
Get the set of squares that are diagonals from this square on an empty board.
Games_Chess::_moveAlgebraic()
Move a piece from one square to another, and mark the old square as empty
Games_Chess::_parseMove()
Parse out the segments of a move (minus any annotations)
Games_Chess::_setupStartingPosition()
Set up the board with the starting position
Games_Chess::_validMove()
Validate a move

Class Details

[line 8]
Standard chess game


[ Top ]


Class Variables

$pieces = array()

[line 9]


Type:   mixed


[ Top ]



Method Detail

addPiece   [line 10]

void addPiece( $color, $type, $square)


Overrides Games_Chess_Standard::addPiece() (Add a piece to the chessboard)

Parameters:

   $color     
   $type     
   $square     

[ Top ]


Documentation generated on Sun, 17 Jun 2007 02:00:57 -0400 by phpDocumentor 1.3.2. PEAR Logo Copyright © PHP Group 2004.