Now that we've introduced the score, we need a way to show the score to the player.
So now we're going to start out first by applying some of success, where do you have an element here
that we can apply scoring to?
Let's create that class of score within our styling and update some of the values.
So, first of all, let's set a background color, and this should be a relatively quick lesson where
we're just going to be updating and outputting the score into the HTML, into the element setting a
height for a text line center, set a color of white and font size, and also let's take a font family.
So how about we do fantasy?
So now we've got our score area and we can put a default value in there so we can see it.
So the score is kind of in the background there.
So what we want to happen is what the score actually to update and the only place we're changing the
score is over here.
So it's relatively straightforward where we can take the inner HTML or the inner text and we can set
it to be equal to the value of score.
And let's also put a message to the player so we can say score.
And then here we've got player taking that player score value and outputting it.
So let's try that out.
So now when we start the game, we see our score is decreasing.
And every time we do a next lap, it's decreasing again, so hopefully by now we've hit our target and
we've got another target and then we can increase the score again by two thousand.
So that's an extra incentive not to miss the target.
And also, every time that we drop one of the bombs, then we also want to decrease the score value.
And there's one other thing that I just quickly noticed, and that's the value of why.
So we don't want to have it overlapping the score area.
So now it's limited to being move, moving up just under the score area and we can probably even change
this to 80.
So sometimes you do need to make these quick minor adjustments just to make sure that your game is functioning
as needed.
And we probably don't need this much spacing for score, but for now, we're going to leave it in case
while playsets, a messaging or some additional information, it's always good to have the spacing for
that builtin.
So add this into your project.
And coming up next, we're going to create the enemy that we need to destroy.
So that's an interesting part.
And that's coming up next.