Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduction/Hangman/Finish the game #164

Open
edutools-service opened this issue Dec 11, 2023 · 0 comments
Open

Introduction/Hangman/Finish the game #164

edutools-service opened this issue Dec 11, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@edutools-service
Copy link

Your tests check that my safeUserInput() function should return "Char". My idea was to return Char nullable because this way I could return null if the input was incorrect, check for null in the main playGame() cycle and interrupt the current iteration with continue, so that if the input is incorrect I could increase the number of attemtps. But I cannot do this (at least I couldn't find any neat way to do this) if safeUserInput() has to return Char and for that recursively run itself in case the input is incorrect. Although it wasn't discussed in the course if I have to treat incorrect inputs as additional attempts or not, I think it would be valid.

@edutools-service edutools-service added the enhancement New feature or request label Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant