Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Program is unable to handle string input when choosing human or AI. #7

Closed
BrentGG opened this issue Dec 19, 2022 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@BrentGG
Copy link
Contributor

BrentGG commented Dec 19, 2022

Describe the bug
When choosing between a human or AI player, if the user inputs one or more non-numerical characters the program becomes unresponsive.

To Reproduce

  1. Run the game.
  2. Type one or more non-numerical characters.

Expected behavior
The program should handle the unexpected input and either ask for the input again, or continue otherwise.

Actual behavior
The program becomes unresponsive and seems to be in a loop of clearing and printing on the console.

@BrentGG BrentGG changed the title Program is unable to handle string input when expecting a number. Program is unable to handle string input when choosing human or AI. Dec 19, 2022
BrentGG referenced this issue in BrentGG/ticTacToeInCPP_task1 Dec 19, 2022
@axelvanherle axelvanherle added the bug Something isn't working label Dec 19, 2022
@axelvanherle
Copy link
Owner

Merged your PR, consider this ticket closed

axelvanherle added a commit that referenced this issue Dec 19, 2022
axelvanherle added a commit that referenced this issue Dec 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants