Guess this may make the AI more accurate :)
Problem caught by gcc:
../../gnushogi/search.c: In function 'search':
../../gnushogi/search.c:887: warning: overflow in implicit constant conversion
A quick audit only revealed a place where another logical AND was
tested using a curious idiom, so let's make it consistent at the same
time.
{ \
if (color[u] != c2) \
{ \
- if ((atk1[u] == 0) || ((atk2[u] & CNT_MASK) > 1)) \
+ if ((atk1[u] == 0) || ((atk2[u] & CNT_MASK) != 0)) \
{ \
++cnt; \
} \
MakeMove(side, node, &tempb, &tempc, &tempsf,
&tempst, &INCscore);
- CptrFlag[ply] = (node->flags & capture);
+ CptrFlag[ply] = ((node->flags & capture) != 0);
TesujiFlag[ply] = (node->flags & tesuji)
&& (node->flags & dropmask);
Tscore[ply] = node->score;