Chess Unwinnability Analyzer is an implementation of a decision procedure for checking whether there exists a sequence of legal moves that allows a certain player to checkmate their opponent in a given chess position.
// Do not reward while Loser has queen(s) if it was their turn
if (!isWinnersTurn && popcount(pos.pieces(loser, QUEEN)) > 0)
variation = (variation = REWARD) ? NORMAL : variation;
// Do not reward after a certain depth
if (search.actual_depth() > 300)
variation = (variation = REWARD) ? NORMAL : variation;
Because below code will always set variation to NORMAL:
variation = (variation = REWARD) ? NORMAL : variation;
However the intention is most likely:
variation = (variation == REWARD) ? NORMAL : variation;
Eclipse marks the below code in dynamic.cpp:
Because below code will always set
variation
toNORMAL
:However the intention is most likely: