Chess Game
1.1.0
A full chess game for Unity
|
The AI Opponent More...
Public Member Functions | |
cgEngine (byte searchDepthWeak=3, byte searchDepthStrong=4) | |
void | makeMove (cgBoard board, bool MoveAsWhiteP, Action< List< cgSimpleMove >> completeCallback, Action< float > progressCallback=null) |
Called when the engine should generate a new move. More... | |
void | TellLegals (bool p) |
Public Attributes | |
bool | MoveAsWhite = true |
Should a move for white(true) or black(false) be generated? More... | |
bool | Finished = false |
Has the engine finished analyzing moves? More... | |
byte | SearchDepthWeak = 4 |
How deep should the engine search seemingly weak move? More... | |
byte | SearchDepthStrong = 4 |
How deep should the engine search a seemingly strong move? More... | |
byte | SearchDepthEndGame =4 |
How deep should the engine search when the number of possible moves are low(i.e. lategame or king checked situations). More... | |
int | BoardStatesExamined = 0 |
How many board states have been examined More... | |
int | CurrentBoardValue = 0 |
The current value of the board. More... | |
List< cgSimpleMove > | Moves |
All legal moves being analyzed. More... | |
int | MovesLeftToAnalyze = 0 |
How many moves are left to analyze. More... | |
int | TotalMovesToAnalyze = 0 |
How many moves in total have to be analyzed. More... | |
The AI Opponent
void cgEngine.makeMove | ( | cgBoard | board, |
bool | MoveAsWhiteP, | ||
Action< List< cgSimpleMove >> | completeCallback, | ||
Action< float > | progressCallback = null |
||
) |
Called when the engine should generate a new move.
board | The current board state. |
MoveAsWhiteP | Move as white(true) or black(false). |
completeCallback | Where the prefered move will be returned. |
int cgEngine.BoardStatesExamined = 0 |
How many board states have been examined
int cgEngine.CurrentBoardValue = 0 |
The current value of the board.
bool cgEngine.Finished = false |
Has the engine finished analyzing moves?
bool cgEngine.MoveAsWhite = true |
Should a move for white(true) or black(false) be generated?
List<cgSimpleMove> cgEngine.Moves |
All legal moves being analyzed.
int cgEngine.MovesLeftToAnalyze = 0 |
How many moves are left to analyze.
byte cgEngine.SearchDepthEndGame =4 |
How deep should the engine search when the number of possible moves are low(i.e. lategame or king checked situations).
byte cgEngine.SearchDepthStrong = 4 |
How deep should the engine search a seemingly strong move?
byte cgEngine.SearchDepthWeak = 4 |
How deep should the engine search seemingly weak move?
int cgEngine.TotalMovesToAnalyze = 0 |
How many moves in total have to be analyzed.