Rev 65 | Rev 82 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 65 | Rev 74 | ||
---|---|---|---|
Line 75... | Line 75... | ||
75 | } |
75 | } |
76 | 76 | ||
77 | // else it's a normal move |
77 | // else it's a normal move |
78 | else |
78 | else |
79 | { |
79 | { |
- | 80 | // does it end with the optional "en passant" prefix ? |
|
- | 81 | if ((fieldstop >= fieldstart + 4) && (wcsncmp (&new_move->pgntext[fieldstop - 3], L"e.p.", 4) == 0)) |
|
- | 82 | fieldstop -= 4; // if so, chop it off |
|
- | 83 | ||
80 | // is the last character a part type ? (WARNING: PART TYPES ARE MANDATORILY IN UPPERCASE) |
84 | // is the last character a part type ? (WARNING: PART TYPES ARE MANDATORILY IN UPPERCASE) |
81 | if ((fieldstop >= fieldstart) && (new_move->pgntext[fieldstop] == L'R')) |
85 | if ((fieldstop >= fieldstart) && (new_move->pgntext[fieldstop] == L'R')) |
82 | { |
86 | { |
83 | new_move->promotion_type = PART_ROOK; // there's a promotion to rook |
87 | new_move->promotion_type = PART_ROOK; // there's a promotion to rook |
84 | fieldstop--; // proceed to previous character |
88 | fieldstop--; // proceed to previous character |