--- gnushogi/genmove.c.old 2006-01-29 11:45:31.000000000 -0700 +++ gnushogi/genmove.c 2006-01-29 11:46:22.000000000 -0700 @@ -40,7 +40,7 @@ static short InCheck = false, GenerateAllMoves = false; static short check_determined = false; -static short INCscore = 0; +static short INCscore_local = 0; short deepsearchcut = true; short tas = false, taxs = false, ssa = false; @@ -261,7 +261,7 @@ node->reply = 0; node->flags = local_flag; node->score = s; - node->INCscore = INCscore; + node->INCscore = INCscore_local; if (GenerateAllMoves) { @@ -504,7 +504,7 @@ if ((boardu = board[u]) == king) { - s += 20; INCscore -= 18; + s += 20; INCscore_local -= 18; *local_flag |= check; /* move threatens * opponents king */ } @@ -555,7 +555,7 @@ } while (u != t); - INCscore += s; + INCscore_local += s; return s; } @@ -620,7 +620,7 @@ return; } - INCscore = 0; + INCscore_local = 0; #ifdef HISTORY s += history[hindex(side, mv)]; @@ -645,14 +645,14 @@ { /* bonus for square near enemy king */ s += 15; - INCscore += 2; + INCscore_local += 2; local_flag |= kingattack; } else if (distance(t, OwnKing) <= 1) { /* bonus for square near own king */ s += 10; - INCscore++; + INCscore_local++; local_flag |= kingattack; } } @@ -765,7 +765,7 @@ { /* bonus for promotions */ s++; - INCscore += value[stage][promoted[piece]] - value[stage][piece]; + INCscore_local += value[stage][promoted[piece]] - value[stage][piece]; } else { @@ -787,12 +787,12 @@ if (piece == pawn || piece == bishop || piece == rook) { local_flag |= stupid; - INCscore -= 20; + INCscore_local -= 20; } else { local_flag |= questionable; - INCscore -= 10; + INCscore_local -= 10; } } }