Guess the Number Game
Try to guess the secret number between 1 and 100.
Can you do it?
Attempts : 0/10
Previous Guesses:
How to Play
- Enter your guess in the input field.
- Click the “Guess Number” button or press Enter to submit your guess.
- Read the message displayed to know if your guess is higher, lower, correct, or invalid.
- Keep guessing until you guess the correct number or reach the maximum number of attempts.
- After the game ends, click the “Try Again” button to start a new game.
Game Interface
Input Field: Enter your guess in this field.
Guess Number Button: Click to check if your guess is correct.
Restart Button: Click to restart the game.
Attempts: Shows the number of attempts you have made out of 10.
Previous Guesses: Shows a list of your previous guesses.
Game Features
- Guess Input: The player can enter their guess in the input field provided.
- Check Button: The player can click the “Check” button to submit their guess.
- Message Display: The game will display messages based on the player’s guess.
- If the guess is invalid (not a number between 1 and 100), a message will be shown asking for a valid guess.
- If the guess has already been guessed before, a message will be shown indicating that the guess has already been made.
- If the guess is lower than the secret number, a message will be shown asking the player to try a higher number.
- If the guess is higher than the secret number, a message will be shown asking the player to try a lower number.
- If the guess is correct, a congratulations message will be shown with the number of attempts taken.
- If the player exceeds the maximum number of attempts, a game-over message will be shown with the secret number.
- Attempts Counter: The game will keep track of the number of attempts made by the player.
- Guessed Numbers List: The game will display a list of all the guessed numbers.
- Each guess in the list will be accompanied by an arrow indicating whether the actual number is higher or lower.
- Restart Button: After the game ends (either by guessing correctly or reaching the maximum attempts), the player can click the “Restart” button to start a new game.
- Guesses cleared automatically after each guess.