Implementation of the chess board without any user interface.View code on GitHub
Inheritance Hierarchy
Chess ChessBoard
Namespace: Chess
Assembly: Chess (in Chess.exe) Version: 1.1.1.0 (1.1.1)
Syntax
The ChessBoard type exposes the following members.
Constructors
Name | Description | |
---|---|---|
ChessBoard |
Class constructor. Build a board.
View code on GitHub | |
ChessBoard(SearchEngine ITrace) |
Class constructor. Build a board.
View code on GitHub |
Methods
Name | Description | |
---|---|---|
CancelSearch |
Cancel search
View code on GitHub | |
CheckIntegrity |
Check the integrity of the board. Use for debugging.
View code on GitHub | |
CheckNextMove |
Check if next move is possible.
View code on GitHub | |
Clone |
Clone the current board
View code on GitHub | |
CloseDesignMode |
Try to close the design mode.
View code on GitHub | |
ComputeBoardExtraInfo |
Compute extra information about the board
View code on GitHub | |
ComputePiecesCoverage |
Enumerates all the possible moves for a player
View code on GitHub | |
CopyFrom |
Copy the state of the board from the specified one.
View code on GitHub | |
CreateGameFromMove |
Create a new game using the specified list of moves
View code on GitHub | |
DoMove |
Do the move
View code on GitHub | |
DoMoveNoLog |
Do the move (without log)
View code on GitHub | |
EnumMoveList(ChessBoard PlayerColorE) |
Enumerates all the possible moves for a player
View code on GitHub | |
EnumMoveList(ChessBoard PlayerColorE, Boolean, ChessBoard PosInfoS ) |
Enumerates all the possible moves for a player
View code on GitHub | |
FindBestMove |
Find the best move for a player using alpha-beta pruning or minmax search
View code on GitHub | |
FindBookMove |
Find a move from the opening book
View code on GitHub | |
FindIfValid |
Find a move from the valid move list
View code on GitHub | |
FindValidPawnPromotion |
Find type of pawn promotion are valid for the specified starting/ending position
View code on GitHub | |
GetEatedPieceCount |
Get the number of the specified piece which has been eated
View code on GitHub | |
GetHumanPos(Int32) |
Gets the position express in a human form
View code on GitHub | |
GetHumanPos(ChessBoard MovePosS) |
Gets the position express in a human form
View code on GitHub | |
IsCheck |
Determine if the specified king is attacked
View code on GitHub | |
IsEnoughPieceForCheckMate |
Check if there is enough pieces to make a check mate
View code on GitHub | |
LoadBoard |
Load the content of the board into the specified stream
View code on GitHub | |
OpenDesignMode |
Open the design mode
View code on GitHub | |
Points |
Evaluates a board. The number of point is greater than 0 if white is in advantage, less than 0 if black is.
View code on GitHub | |
ReadBook |
Read the opening book from disk
View code on GitHub | |
ReadBookFromResource |
Read the opening book from disk
View code on GitHub | |
RedoMove |
Redo a move
View code on GitHub | |
ResetBoard |
Reset the board to the initial configuration
View code on GitHub | |
SaveBoard |
Save the content of the board into the specified binary writer
View code on GitHub | |
SetUndoRedoPosition |
SetUndoRedoPosition: Set the Undo/Redo position
View code on GitHub | |
UndoAllMoves |
Undo all the specified move starting with the last move
View code on GitHub | |
UndoMove |
Undo a move
View code on GitHub | |
UndoMoveNoLog |
Undo a move (without log)
View code on GitHub |
Fields
Name | Description | |
---|---|---|
s_posInfoNull | NULL position infoView code on GitHub |
Properties
Name | Description | |
---|---|---|
BlackPieceCount |
Gets the number of black pieces on the board
View code on GitHub | |
CurrentMoveColor |
Current moving color
View code on GitHub | |
CurrentZobristKey |
Current Zobrist key value
View code on GitHub | |
DesignMode |
Determine if the board is in design mode
View code on GitHub | |
Item Int32 |
Get a piece at the specified position. Position 0 = Lower right (H1), 63 = Higher left (A8)
View code on GitHub | |
Item Int32, Int32 | ||
MovePosStack |
Stack of all moves done since initial board
View code on GitHub | |
NextMoveColor |
Next moving color
View code on GitHub | |
StandardInitialBoard |
true if the board is standard, false if initialized from design mode or FEN
View code on GitHub | |
WhitePieceCount |
Gets the number of white pieces on the board
View code on GitHub |
See Also