Lines 40-46
Link Here
|
40 |
static short InCheck = false, GenerateAllMoves = false; |
40 |
static short InCheck = false, GenerateAllMoves = false; |
41 |
static short check_determined = false; |
41 |
static short check_determined = false; |
42 |
|
42 |
|
43 |
static short INCscore = 0; |
43 |
static short INCscore_local = 0; |
44 |
|
44 |
|
45 |
short deepsearchcut = true; |
45 |
short deepsearchcut = true; |
46 |
short tas = false, taxs = false, ssa = false; |
46 |
short tas = false, taxs = false, ssa = false; |
Lines 261-267
Link Here
|
261 |
node->reply = 0; |
261 |
node->reply = 0; |
262 |
node->flags = local_flag; |
262 |
node->flags = local_flag; |
263 |
node->score = s; |
263 |
node->score = s; |
264 |
node->INCscore = INCscore; |
264 |
node->INCscore = INCscore_local; |
265 |
|
265 |
|
266 |
if (GenerateAllMoves) |
266 |
if (GenerateAllMoves) |
267 |
{ |
267 |
{ |
Lines 504-510
Link Here
|
504 |
|
504 |
|
505 |
if ((boardu = board[u]) == king) |
505 |
if ((boardu = board[u]) == king) |
506 |
{ |
506 |
{ |
507 |
s += 20; INCscore -= 18; |
507 |
s += 20; INCscore_local -= 18; |
508 |
*local_flag |= check; /* move threatens |
508 |
*local_flag |= check; /* move threatens |
509 |
* opponents king */ |
509 |
* opponents king */ |
510 |
} |
510 |
} |
Lines 555-561
Link Here
|
555 |
} |
555 |
} |
556 |
while (u != t); |
556 |
while (u != t); |
557 |
|
557 |
|
558 |
INCscore += s; |
558 |
INCscore_local += s; |
559 |
|
559 |
|
560 |
return s; |
560 |
return s; |
561 |
} |
561 |
} |
Lines 620-626
Link Here
|
620 |
return; |
620 |
return; |
621 |
} |
621 |
} |
622 |
|
622 |
|
623 |
INCscore = 0; |
623 |
INCscore_local = 0; |
624 |
|
624 |
|
625 |
#ifdef HISTORY |
625 |
#ifdef HISTORY |
626 |
s += history[hindex(side, mv)]; |
626 |
s += history[hindex(side, mv)]; |
Lines 645-658
Link Here
|
645 |
{ |
645 |
{ |
646 |
/* bonus for square near enemy king */ |
646 |
/* bonus for square near enemy king */ |
647 |
s += 15; |
647 |
s += 15; |
648 |
INCscore += 2; |
648 |
INCscore_local += 2; |
649 |
local_flag |= kingattack; |
649 |
local_flag |= kingattack; |
650 |
} |
650 |
} |
651 |
else if (distance(t, OwnKing) <= 1) |
651 |
else if (distance(t, OwnKing) <= 1) |
652 |
{ |
652 |
{ |
653 |
/* bonus for square near own king */ |
653 |
/* bonus for square near own king */ |
654 |
s += 10; |
654 |
s += 10; |
655 |
INCscore++; |
655 |
INCscore_local++; |
656 |
local_flag |= kingattack; |
656 |
local_flag |= kingattack; |
657 |
} |
657 |
} |
658 |
} |
658 |
} |
Lines 765-771
Link Here
|
765 |
{ |
765 |
{ |
766 |
/* bonus for promotions */ |
766 |
/* bonus for promotions */ |
767 |
s++; |
767 |
s++; |
768 |
INCscore += value[stage][promoted[piece]] - value[stage][piece]; |
768 |
INCscore_local += value[stage][promoted[piece]] - value[stage][piece]; |
769 |
} |
769 |
} |
770 |
else |
770 |
else |
771 |
{ |
771 |
{ |
Lines 787-798
Link Here
|
787 |
if (piece == pawn || piece == bishop || piece == rook) |
787 |
if (piece == pawn || piece == bishop || piece == rook) |
788 |
{ |
788 |
{ |
789 |
local_flag |= stupid; |
789 |
local_flag |= stupid; |
790 |
INCscore -= 20; |
790 |
INCscore_local -= 20; |
791 |
} |
791 |
} |
792 |
else |
792 |
else |
793 |
{ |
793 |
{ |
794 |
local_flag |= questionable; |
794 |
local_flag |= questionable; |
795 |
INCscore -= 10; |
795 |
INCscore_local -= 10; |
796 |
} |
796 |
} |
797 |
} |
797 |
} |
798 |
} |
798 |
} |