- Updates `calc` to return if the user won.
- We can then look at the status (win) and continue the loop
instead of falling through to the "Try again?..." section.
- Adds continuation after a caught error to prevent the secret from
resetting
- Empties the `secret` before regenerating it.
- `generateSecret() appends to the secret so the second game had a
len(secret) of 8
- This caused the compare function to out of bounds on the `guess`
array.
- Changed the output formatting of the hit to help readability.
- Some ideas
- setting a variable to a length of 4 and referencing that in
generateSecret, checkGuess, and compare would allow changing the
difficulty, example:
- Easy: length 5
- Medium: length 6
- Hard: length 8
- Ask the user for a difficulty before the start of the game.