'p', 'n', 'b', 'r', 'q', 'f', 'e', 'a', 'c', 'w', 'm',
'o', 'h', 'i', 'j', 'g', 'd', 'v', 'l', 's', 'u', 'k',
'x' };
+char pieceNickName[EmptySquare];
char PieceToChar(p)
ChessSquare p;
{
int i;
for(i=0; i< (int) EmptySquare; i++)
+ if(pieceNickName[i] == c) return (ChessSquare) i;
+ for(i=0; i< (int) EmptySquare; i++)
if(pieceToChar[i] == c) return (ChessSquare) i;
return EmptySquare;
}
closure->kind = c == '=' ? IllegalMove : WhitePromotionKnight;
else /* promotion optional, default is promote */
closure->kind = c == '=' ? NormalMove : WhitePromotionQueen;
-
+ if(c != '=') closure->promoCharIn = 'q';
} else closure->kind = (c == NULLCHAR || c == 'x' || c == '=') ?
NormalMove : IllegalMove;
} else {
closure->kind = c == '=' ? IllegalMove : BlackPromotionKnight;
else /* promotion optional, default is promote */
closure->kind = c == '=' ? NormalMove : BlackPromotionQueen;
-
+ if(c != '=') closure->promoCharIn = 'q';
} else closure->kind = (c == NULLCHAR || c == 'x' || c == '=') ?
NormalMove : IllegalMove;
}