The evaluation routine still assumed location[] was an array of 64,
rather than 96, so it expected the King location in the wrong place.
Evaluate (int stm, int rights)
{
int k, score = 0;
- k = location[31];
+ k = location[WHITE+31];
score += ((board[k+22] == WHITE) + (board[k+22+1] == WHITE) + (board[k+22-1] == WHITE))*2;
score -= !board[k+22] + !board[k+22+1] + !board[k+22-1];
score -= ((board[k+44] == BLACK) + (board[k+44+1] == BLACK) + (board[k+44-1] == BLACK))*5;
if(k >= killZone) score -= 100;
- k = location[WHITE+31];
+ k = location[BLACK+31];
score -= ((board[k-22] == BLACK) + (board[k-22+1] == BLACK) + (board[k-22-1] == BLACK))*2;
score += !board[k-22] + !board[k-22+1] + !board[k-22-1];
score += ((board[k-44] == WHITE) + (board[k-44+1] == WHITE) + (board[k-44-1] == WHITE))*5;