Call this one at the box chaser game, because it just makes sense, we've got a bunch of boxes.
You're the red box.
You've got to move it over the green box until you hit the green box.
Then that's the real objective of the game.
And really the objective here, the learning objective is to learn how to use JavaScript in order to
create elements and build this type of grid system and then also track where the element is on the grid
system using your keyboard collision detection?
Well, not really collision detection.
We're just going to detect to see if the red box is on the same square as the green box.
So this is a different way to approach that collision, to check, to see if one element is overlapping
the other as these are all going to be subsequent within the grid and they're all going to have their
own separate spots within the grid, which is going to be dynamically created with JavaScript, which
means that you can expand it and make it bigger and smaller as needed and make those adjustments.
So let me show you.
So when we come into the game with Build So Grid, so this is all dynamically created with JavaScript
and it listens for key presses.
And whenever you press the keyboard keys, we can move through the grid.
You can also see that we're restricted to only stay on the grid.
So this is done with conditions.
And then when we hit the Green Square, then it just moves, it picks another random spot and it also
doesn't pick the same random spot that we're actually on.
So that's another thing to consider when you're building this.
And all of this is covered, of course, within this section to build out your own version of this fun,
interesting interactive game.