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

A simple non-passant and non-castling move, stores information such as the index of the departing square and the index of the arriving square. More...

Inherited by cgCastlingMove, and cgEnPassantMove.

Public Member Functions

 cgSimpleMove (byte fromp, byte top, sbyte posVal=(sbyte) 0)
 A simple move, moving a single piece to another square. More...
 
virtual cgSimpleMove duplicate ()
 Duplicate this move. Used when duplicating a board which has had moves performed on it, said moves are also duplicated. More...
 

Public Attributes

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

A simple non-passant and non-castling move, stores information such as the index of the departing square and the index of the arriving square.

Constructor & Destructor Documentation

◆ cgSimpleMove()

cgSimpleMove.cgSimpleMove ( byte  fromp,
byte  top,
sbyte  posVal = (sbyte)0 
)

A simple move, moving a single piece to another square.

Parameters
frompThe 0-64 index of the square being departed from.
topThe 0-64 index of the square beeing arrived at.
posValThe positional value, used by engine to sort moves in a best-first manner.

Member Function Documentation

◆ duplicate()

virtual cgSimpleMove cgSimpleMove.duplicate ( )
virtual

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

Returns

Reimplemented in cgCastlingMove, and cgEnPassantMove.

Member Data Documentation

◆ bestResponse

cgSimpleMove cgSimpleMove.bestResponse

Used by the engine for debugging purposes.

◆ capturedType

sbyte cgSimpleMove.capturedType = 0

The type of the piece being captured.

◆ from

byte cgSimpleMove.from

The square being departed from.

◆ positionalVal

sbyte cgSimpleMove.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.

◆ queened

bool cgSimpleMove.queened

Did this move lead to a pawn promoting to a queen(queening)?

◆ to

byte cgSimpleMove.to

The square being arrived at.

◆ val

int cgSimpleMove.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


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