| 662 /* ignore empty move strings and ask again */ |
662 /* ignore empty move strings and ask again */ |
| 663 } else { |
663 } else { |
| 664 Move move; |
664 Move move; |
| 665 int eval_result = eval_move(gamestate, |
665 int eval_result = eval_move(gamestate, |
| 666 movestr, mycolor, &move); |
666 movestr, mycolor, &move); |
| 667 switch (eval_result) { |
667 if (eval_result == VALID_MOVE_SYNTAX) { |
| 668 case VALID_MOVE_SYNTAX: |
|
| 669 NetMove nmove = hton_move(move); |
668 NetMove nmove = hton_move(move); |
| 670 net_send_data(opponent, NETCODE_MOVE, &nmove, NETMOVE_LEN); |
669 net_send_data(opponent, NETCODE_MOVE, &nmove, NETMOVE_LEN); |
| 671 code = net_recieve_code(opponent); |
670 code = net_recieve_code(opponent); |
| 672 if (code == NETCODE_DECLINE_MOVE) { |
671 if (code == NETCODE_DECLINE_MOVE) { |
| 673 uint8_t reason; |
672 uint8_t reason; |