| 152 } while (!isspace(c = *(pgndata++))); |
152 } while (!isspace(c = *(pgndata++))); |
| 153 movestr[i] = '\0'; |
153 movestr[i] = '\0'; |
| 154 if (eval_move(gamestate, movestr, &move, curcol) |
154 if (eval_move(gamestate, movestr, &move, curcol) |
| 155 != VALID_MOVE_SYNTAX) { |
155 != VALID_MOVE_SYNTAX) { |
| 156 return pgn_error_move_syntax; |
156 return pgn_error_move_syntax; |
| 157 } |
157 } |
| 158 if (validate_move(gamestate, &move) != VALID_MOVE_SEMANTICS) { |
158 if (validate_move(gamestate, &move) != VALID_MOVE_SEMANTICS) { |
| 159 return pgn_error_move_semantics; |
159 return pgn_error_move_semantics; |
| 160 } |
160 } |
| 161 apply_move(gamestate, &move); |
161 apply_move(gamestate, &move); |
| 162 |
162 |