Rev 153 | Rev 177 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 153 | Rev 171 | ||
---|---|---|---|
Line 371... | Line 371... | ||
371 | } |
371 | } |
372 | 372 | ||
373 | // END evaluating server replies |
373 | // END evaluating server replies |
374 | //////////////////////////////// |
374 | //////////////////////////////// |
375 | 375 | ||
376 | // have we been notified that the current player just |
376 | // have we been notified that the current player just changed ? |
377 | if ( |
377 | if (player->should_wakeup) |
378 | { |
378 | { |
- | 379 | // has at least one move been played AND is it the remote player's turn now ? |
|
- | 380 | if ((the_board.move_count > 1) && (Board_ColorToMove (&the_board) == player->color)) |
|
- | 381 | { |
|
379 | Debug_Log (L"===Local player just played, sending the chosen move to chess server===\n"); |
382 | Debug_Log (L"===Local player just played, sending the chosen move to chess server===\n"); |
380 | Player_SendBuffer_Add (player, 1000, L"%s\n", the_board.moves[the_board.move_count - 1].pgntext); // send the move string to the chess server |
383 | Player_SendBuffer_Add (player, 1000, L"%s\n", the_board.moves[the_board.move_count - 1].pgntext); // send the move string to the chess server |
- | 384 | } |
|
- | 385 | player->should_wakeup = false; // remember we took this notification into account |
|
381 | } |
386 | } |
382 | 387 | ||
383 | // has the user entered some chatter text ? |
388 | // has the user entered some chatter text ? |
384 | if (!the_scene.gui.is_entering_text && (the_scene.gui.entered_ccreply.text != NULL)) |
389 | if (!the_scene.gui.is_entering_text && (the_scene.gui.entered_ccreply.text != NULL)) |
385 | { |
390 | { |