1214 |
* |
* |
1215 |
***************************************************************************/ |
***************************************************************************/ |
1216 |
{ |
{ |
1217 |
int s = 0; |
int s; |
|
int xside; |
|
1218 |
int sq; |
int sq; |
1219 |
BitBoard c; |
BitBoard c; |
1220 |
|
|
|
xside = 1 ^ side; |
|
|
|
|
1221 |
/* Calculate whether we are developed */ |
/* Calculate whether we are developed */ |
1222 |
c = (board.b[side][knight] & nn[side]) | (board.b[side][bishop] & bb[side]); |
c = (board.b[side][knight] & nn[side]) | (board.b[side][bishop] & bb[side]); |
1223 |
s += nbits(c) * -8; |
s = nbits(c) * -8; |
1224 |
|
|
1225 |
/* If we are castled or beyond the 10th move, no more ScoreDev */ |
/* If we are castled or beyond the 20th move, no more ScoreDev */ |
1226 |
if (board.castled[side] || GameCnt/2+1 >= 20) |
if (board.castled[side] || GameCnt >= 38) |
1227 |
return (s); |
return (s); |
1228 |
|
|
1229 |
s += NOTCASTLED; |
s += NOTCASTLED; |
1261 |
} |
} |
1262 |
|
|
1263 |
/* Discourage any wing pawn moves */ |
/* Discourage any wing pawn moves */ |
1264 |
c = board.b[side][pawn] & (FileBit[0]|FileBit[1]|FileBit[6]|FileBit[7]); |
/* c = board.b[side][pawn] & (FileBit[0]|FileBit[1]|FileBit[6]|FileBit[7]); */ |
1265 |
|
c = board.b[side][pawn] & ULL(0xc3c3c3c3c3c3c3c3); |
1266 |
while (c) { |
while (c) { |
1267 |
sq = leadz(c); |
sq = leadz(c); |
1268 |
CLEARBIT(c, sq); |
CLEARBIT(c, sq); |
1271 |
} |
} |
1272 |
|
|
1273 |
/* Discourage any repeat center pawn moves */ |
/* Discourage any repeat center pawn moves */ |
1274 |
c = board.b[side][pawn] & (FileBit[2]|FileBit[3]|FileBit[4]|FileBit[5]); |
/* c = board.b[side][pawn] & (FileBit[2]|FileBit[3]|FileBit[4]|FileBit[5]); */ |
1275 |
|
c = board.b[side][pawn] & ULL(0x3c3c3c3c3c3c3c3c); |
1276 |
while (c) { |
while (c) { |
1277 |
sq = leadz(c); |
sq = leadz(c); |
1278 |
CLEARBIT(c, sq); |
CLEARBIT(c, sq); |