break;
}
}
+ if (!found)
+ printf("# Invalid piece type '%c'\n", s[0]);
continue;
}
r = ROW_NUM(s[2]);
if ((c < 0) || (c >= NO_COLS) || (r < 0) || (r >= NO_ROWS)) {
+ printf("# Out-of-board position '%c%c'\n", s[1], s[2]);
continue;
}
sq = locn(r, c);
- color[sq] = a;
- board[sq] = no_piece;
for (i = no_piece; i <= king; i++)
{
if ((s[0] == pxx[i]) || (s[0] == qxx[i]))
{
+ color[sq] = a;
if (s[3] == '+')
board[sq] = promoted[i];
else
}
}
- if (found == 0)
- color[sq] = neutral;
+ if (!found)
+ printf("# Invalid piece type '%c'\n", s[0]);
}
for (sq = 0; sq < NO_SQUARES; sq++)