In the previous lesson, we left off where we were starting the game and we enabled the start button,
when you click it, it starts the game.
So it really doesn't do a whole lot quite yet, lugs it into the console and that's about it.
So let's do some interaction and set the plate, start object and apply a style to it.
And the style that we're applying is going to be display and display none.
So what do you think this does?
And if you said that this is going to hide the start one, you're.
So the start button now is gone because once we start the game, we're actually not going to need the
start button anymore.
And what do we want to do within start?
So we want to build the game board.
So this is going to be a function that we're going to launch and I'll create a placeholder for that.
So usually when I do create these new functions that what I want to do within the function and I called
this one guild built game board.
So within here, this is just going to be a placeholder for the next lesson build board.
So that's what we want to do.
That's the first thing we want to do because we want to have an interface for the user to work with.
And we also want to set up a few of the game objects.
So the last offer.
So whatever the last offer was, there's no last offer.
So we'll just set that to false.
So it's not going to be the last offer we do on a track to make sure and check to see if the last offer
has been sent.
And if it has, then we know that the game is over, that we're not sending any more offers.
So that's why we've got that one.
And then there's also the game object where we created the template.
So we want to enable this.
And as mentioned, this is the main game controller, which is going to allow the game to play or not
play.
So we're always going to look for that one.
And then there's also the game offer made.
So this is a new value.
And we want to set this one to zero because we want to track how many offers have been made on the last
offer and so on.
And we also want to enable some of these pop ups because we want the user to be able to see what they're
going to do.
So let's create a function that's going to pop up those models and we're going to do the models in the
next lesson.
So show you how to do those.
And this is going to enable those models to pop up.
And we're going to ask the player, we're going to give the player some instructions, select a case.
So that's how the game starts.
The player selects a case that they want to keep as their own case.
So we're going to present them with all of the cases that are available.
And those cases are going to be based on the values.
So win over a number of values we have.
That's how many cases.
So we have to randomize where they're going to be positioned.
And then we're going to send over this message to the user to select a case and then give them click
any of the pillow cases and we'll have to position the cases below the start objects while position
all the cases there in the main area.
So that's what we want the user to do, is they want to select a case.
And as mentioned, it's going to be these pop ups that are going to be the movement between the different
game stages.
So that's how the player's going to move between the game objects.
So we're going to have a pop up screen and then we're going to be asking the user and within the Pop-Up,
this is where we need to create the next step as well.
And this pop up is going to be taking in a message.
And for now with just message will console log out the message that we're displaying.
And in the next lesson, we're going to enable the pop ups.
So that's all we need to do to kickoff the game where we're going to start the game.
And then once the player clicks start, then the game is started.
We're going to build the game board and then we're also going to give the user instructions for their
first step within the gameplay.
So the idea is that within the game board, we're going to present all of the cases.
They're all going to be clickable.
The user's going to have to click a certain amount of cases.
And every once in a while we're going to trigger an offer.
And that offer is going to pop up.
It's going to be based on the values of the remaining cases.
So that's what we need to track that as well with in the background so we can calculate how many values
and how what the offer should be.
We're also going to be tracking to see if it's the last offer and we're also tracking the number of
offers that are made.
So that is all still yet to come.
And coming up next, we're going to enable our pop up message.
So this was a quick one and this is how to get the game started.
So when you are creating a game, think through the logic of what's your first step when the player
comes in?
What's the first action that you want them to do and then build up some placeholder functions for those
actions, build those actions and then go back to the start, play through it.
You can continue to build out all of your game structure that way.
So add this into your project.