Check out my Number Wizard game, Savant.
I noticed opportunity for a few additions to the original Number Wizard game from the tutorial video.
I added a “Guesses Remaining” display to keep up with how many more tries the computer has to guess the player’s number.
I also added some code so that if you click higher or lower and the computer’s guess number doesn’t change, those clicks won’t decrease the number of guesses the computer has left.
A screenshot of my code is below. I’m not sure if I need the awake function in addition to a start function but I used awake to make sure the initial “guess” value is already on screen when the game begins.
I also decided to leave out the Quit option since this is a web build.
Please let me know if you have any feedback on how I could reduce the lines of code in the program, if you run into any errors/glitches, and what you think about giving the computer 15 attempts to guess the number.
Another idea I had is to add sound effects on button click but I haven’t learned how to do that yet and didn’t feel it was worth the time currently to try to learn it myself when I’m pretty sure Ben will be teaching me later.
Also note, I decided not to put a ton of time into aesthetics because I am ready to move on to the next project in the course!
I had a lot of fun working on the UI for this game!