protected void AddPromotionMoves(Move[] innerArray, int index, Figure destinationFigure)
{
if (destinationFigure != Figure.Nobody)
{
innerArray[index].Type = MoveType.KnightPromoCapture;
innerArray[index + 1].Type = MoveType.BishopPromoCapture;
innerArray[index + 2].Type = MoveType.RookPromoCapture;
innerArray[index + 3].Type = MoveType.QueenPromoCapture;
}
else
{
innerArray[index].Type = MoveType.KnightPromotion;
innerArray[index + 1].Type = MoveType.BishopPromotion;
innerArray[index + 2].Type = MoveType.RookPromotion;
innerArray[index + 3].Type = MoveType.QueenPromotion;
}
for (int i = 0; i < 4; ++i)
innerArray[i].Value += (int)innerArray[i].Type * MoveTypeWeight;
}