nurselaine / typeracer

Typeracer Game
2 stars 1 forks source link

Handle incorrect client input on the client-side #13

Open nurselaine opened 6 months ago

nurselaine commented 6 months ago

When client receives incorrect input (ex. "nfjiaws") it will shutdown

Expected: Client should be able to handle incorrect input and notify client to re-type one of the available input options.

charsirelee commented 6 months ago

The issue arises when the server shuts down upon receiving invalid input from a client, such as "nfjiaws". The expected functionality is for the server to remain active, inform the client about the unrecognized input, and request a valid command. To address this, the ReceiveMessage method in the ClientHandler class needs enhancement to catch and respond to any unexpected inputs with a prompt for correct input, thus maintaining the connection and guiding the user appropriately.

charsirelee commented 6 months ago

I tried to fix this issue please double check in the issue #13 branch