| 476 } else if (strncmp(movestr, "savepgn", MOVESTR_BUFLEN) == 0) { |
476 } else if (strncmp(movestr, "savepgn", MOVESTR_BUFLEN) == 0) { |
| 477 save_pgn(gamestate, gameinfo); |
477 save_pgn(gamestate, gameinfo); |
| 478 } else if (movestr[0] == 0) { |
478 } else if (movestr[0] == 0) { |
| 479 memset(gamestate->premove, 0, sizeof(gamestate->premove)); |
479 memset(gamestate->premove, 0, sizeof(gamestate->premove)); |
| 480 } else { |
480 } else { |
| 481 Move move; |
481 int res = check_move(movestr, mycolor); |
| 482 int res = eval_move(gamestate, movestr, &move, mycolor); |
|
| 483 if (res == VALID_MOVE_SYNTAX) { |
482 if (res == VALID_MOVE_SYNTAX) { |
| 484 strncpy(gamestate->premove, movestr, 8); |
483 strncpy(gamestate->premove, movestr, 8); |
| 485 memset(movestr, 0, MOVESTR_BUFLEN); |
484 memset(movestr, 0, MOVESTR_BUFLEN); |
| 486 bufpos = 0; |
485 bufpos = 0; |
| 487 clrtobot(); |
486 clrtobot(); |