Stupid Moves Checker

Huo Chess Update

In the ComputerMove function, there is a code segment checking the ‘stipidity’ of the move analyzed.

if ((Number_of_attackers[(m_FinishingColumnNumber - 1), (m_FinishingRank - 1)] >= 1) && (Value_of_attackers[(m_FinishingColumnNumber - 1), (m_FinishingRank - 1)] < ValueOfMovingPiece))
{
ThiisIsStupidMove = "Y";
}

Proposed improvement in v0.9923: Check not only if number of attackers is more than 1 but if it is greater than the number of defenders.

In that way, the program will better evaluate the possible moves, since now it avoids every square where there is even just one attacker regardless of the number of defenders.

Important Note: This can and will be more elaborate, when I add the check of the value of the defenders and the attackers. For example, there is no point in losing your queen to gain 3 pawns.

Leave a comment