| 617 code = net_recieve_code(opponent); |
617 code = net_recieve_code(opponent); |
| 618 /* we could validate the move's check/checkmate flag with |
618 /* we could validate the move's check/checkmate flag with |
| 619 * the network response code, but we choose not to do it */ |
619 * the network response code, but we choose not to do it */ |
| 620 gamestate->checkmate = code == NETCODE_CHECKMATE; |
620 gamestate->checkmate = code == NETCODE_CHECKMATE; |
| 621 gamestate->stalemate = code == NETCODE_STALEMATE; |
621 gamestate->stalemate = code == NETCODE_STALEMATE; |
| 622 if (code == NETCODE_DECLINE) { |
622 if (code == NETCODE_DECLINE_MOVE) { |
| 623 uint32_t reason; |
623 uint32_t reason; |
| 624 net_recieve_data(opponent, &reason, sizeof(uint32_t)); |
624 net_recieve_data(opponent, &reason, sizeof(uint32_t)); |
| 625 reason = ntohl(reason); |
625 reason = ntohl(reason); |
| 626 eval_move_failed_msg(reason); |
626 eval_move_failed_msg(reason); |
| 627 } else if (code == NETCODE_ACCEPT |
627 } else if (code == NETCODE_ACCEPT |