diff options
Diffstat (limited to 'client/verification_client_input.c')
-rw-r--r-- | client/verification_client_input.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/client/verification_client_input.c b/client/verification_client_input.c index 171cd64..fa88b54 100644 --- a/client/verification_client_input.c +++ b/client/verification_client_input.c @@ -39,6 +39,7 @@ int vci_attack_or_tossing(int fd, char *buffer, player_cards deck, if(state == tossing && buffer[0] == '\n') { /* cancel card tossing */ write(fd, buffer, 1); + printf("skipping the card toss\n"); return 1; } @@ -72,9 +73,9 @@ int vci_attack_or_tossing(int fd, char *buffer, player_cards deck, ++free_pos; } if(state == attack && buffer[0] == '\n') { - printf("incorrect input\n> "); - fflush(stdout); - return 0; + printf("incorrect input\n> "); + fflush(stdout); + return 0; } output_buffer[free_pos] = '\n'; write(fd, output_buffer, free_pos+1); @@ -92,6 +93,7 @@ int vci_defense(int fd, char *buffer, player_cards deck) if(buffer[0] == '\n') { /* the player does not want to keep the defense */ write(fd, buffer, 1); + printf("accepting cards\n"); return 1; } if(buffer[1] != '\n') { @@ -107,5 +109,7 @@ int vci_defense(int fd, char *buffer, player_cards deck) return 1; } /* card is not found in the deck or cannot be used */ + printf("incorrect input\n> "); + fflush(stdout); return 0; } |