Welcome back.
Congratulations on making it this far into the course, this lesson, we're going to run through the
game and make some tweaks and updates to the gameplay.
So we're coming to the game.
And this is where the user experience comes in that we see that we've got.
Welcome to the game guests.
A number one to 10.
We probably don't need the welcome to the game.
So let's get rid of that, try the game out and play through the game so we see that the number was
higher.
Let's try a lower number or let's try a higher number so we can go to ten.
And we know the number is nine because it's OK put in the console.
So we're going to have to remove that as well after we finished testing and debugging.
So now we know that the number was lower.
So let's guess correctly, and you might want to keep this in place while you're doing your debugging
and you're testing of the gameplay.
So correct.
Guess of nine in four.
Guess that one is OK.
And then when we restart the game, we got welcome to the game.
Guess the number one to ten.
So let's get rid of that welcome message.
And we also noticed that the button moves from over here to down here because we're applying the display
style of block, which is moving the buttons.
We need to take care of that and handle that as well within the styling.
So just lets us make a few updates and add the button element.
So couldn't do a display block.
So that's more consistent with what's happening within the gameplay.
And of course, you're probably going to want to play your own styling to play the feel that you want
for the game.
And this is also the point where you want to make any of the updates that you want within the game as
well.
And then message, let's add margin around that.
So there's additional spacing around the message.
We can also make the button bigger as well.
I usually like to set a meme with snow.
We've got a guess.
We've got the button content.
Also update the button font size.
So that's a bit bigger.
And then font family can also be updated and set of height.
Maybe we could do padding around the button and border radius.
So it looks like we've got all of the functionality, the few other things that we can update and we
can update it more and back to templated format.
So instead of sending in these strings, we can send these strings through within a backpack template
format.
So what I mean by that is using that Bostik instead of the quotes, and that's also provide you more
flexibility within your string so you can add in the quotes as needed.
So I'm just replacing all of these quotes with tactics and using the Batek templating format.
You can also update your addin variables by using the dollar sign and the curly bracket so you don't
have to break in and out of your string, which looks a whole lot better, of course.
And that's how we can pass variables into the message area.
And we'll do the same thing for our tenth message here.
So using back ticks again and then we're we're need to use the string values.
We're going to use the curly brackets so those variables get added into our content.
I think we're ready to try it again.
So let's do a refresh and see.
It doesn't affect that.
I would put that output is still the same.
If you go to inspect that output that's being output there is still the same.
So always run through it and make sure that things are working as you're expecting it to.
So every time we run the game against whatever time the game has to run again, whenever it's game over,
we can update the game minimum or game maximum to increase.
We can increase it by five.
That makes the game more interesting as you play through it.
So now we're guessing a number from one to fifteen was higher.
Now we're guessing a number from one to twenty.
So we've made it fairly dynamic.
Also, let's get rid of the console messages.
And sometimes there are several gameplay throughout that you need to do in order to make sure that you've
addressed all of the functionality.
And once you're happy, you're ready to launch the game, finish off all of the gameplay to do a quick
refresh there.
So now it's up to you.
Take the source code, try it out for yourself, make sure the game is functioning as needed.
And coming up next, to do a quick code review, an overview.