A Java command line game where the user must guess a number from 1-20.
Requirements:
- The game asks the user for their name, guess, and whether or not they would like to play again.
- The game must generate a random number from 1-20.
- The game has input validation using try catch blocks for the name (no empty string and no special characters).
- The game has input validation using try catch blocks for the guesses (no empty string and must be a number from 1-20).
- The game has input validation using try catch blocks for whether the user wants to play again (no empty string and only y/Y or n/N).
- The game must reset if the user answers yes and ends if the user says no.
- The game has a counter to keep track of how many valid guesses the user makes before winning.
- If the user's guess is wrong, the program will tell the user whether their guess is too high or too low.