The program starts by asking the player to pick a difficulty — Easy, Medium, or Hard — which sets the range of numbers the random number can be chosen from.
Once a difficulty is picked, it generates a random number and then enters a guessing loop…
The program starts by asking the player to pick a difficulty — Easy, Medium, or Hard — which sets the range of numbers the random number can be chosen from.
Once a difficulty is picked, it generates a random number and then enters a guessing loop. On each guess, it checks if the input is a valid number within the range, and tells the player to go higher or lower until they get it right.
When the player guesses correctly, they’re asked if they want to play again — if yes, a new number is generated; if no, the game exits.
The first hour and a half I didn’t use any AI but then Claude gave me an idea on a new and shorter type of structure. It didn’t give the code, just the structure. I also used it for debugging the last part.