Chess Game  1.1.0
A full chess game for Unity
cgCastlingMove Class Reference

Castling moves the king and a rook, this class has additional properties to handle this additional information. More...

Inherits cgSimpleMove.

Public Member Functions

 cgCastlingMove (byte fromp, byte top, sbyte posVal, byte s_from, byte s_to)
 
override cgSimpleMove duplicate ()
 Duplicate this move. Used when duplicating a board which has had moves performed on it, said moves are also duplicated. More...
 
- Public Member Functions inherited from cgSimpleMove
 cgSimpleMove (byte fromp, byte top, sbyte posVal=(sbyte) 0)
 A simple move, moving a single piece to another square. More...
 

Public Attributes

byte secondFrom
 The square the rook being castled is departing from. More...
 
byte secondTo
 The square the rook being castled will arrive at. More...
 
- Public Attributes inherited from cgSimpleMove
byte from
 The square being departed from. More...
 
byte to
 The square being arrived at. More...
 
sbyte capturedType = 0
 The type of the piece being captured. More...
 
sbyte positionalVal
 The positional value, used by the AlphaBeta Search algorithm, the higher this value the earlier the algorithm examines it - this does not mean the AI is more likely to pick it. More...
 
int val
 The actual value of the total board after this move has been performed based on material, pattern and positional values. Calculated by cgBoard.Evaluate More...
 
cgSimpleMove bestResponse
 Used by the engine for debugging purposes. More...
 
bool queened
 Did this move lead to a pawn promoting to a queen(queening)? More...
 

Detailed Description

Castling moves the king and a rook, this class has additional properties to handle this additional information.

Member Function Documentation

◆ duplicate()

override cgSimpleMove cgCastlingMove.duplicate ( )
virtual

Duplicate this move. Used when duplicating a board which has had moves performed on it, said moves are also duplicated.

Returns

Reimplemented from cgSimpleMove.

Member Data Documentation

◆ secondFrom

byte cgCastlingMove.secondFrom

The square the rook being castled is departing from.

◆ secondTo

byte cgCastlingMove.secondTo

The square the rook being castled will arrive at.


The documentation for this class was generated from the following file: