Game Development Reference
The lh]uan can then reach the atep object, and the Game Over screen is displayed, announcing that
the game has been won:
And there you have it; Dungeon Maze Adventure is solved!
Modifying the game
Dungeon Maze Adventure is designed as a model to introduce you to some basic object-oriented pro-
gramming techniques and get you thinking about how to distribute the tasks of your game to different
classes. You can take some of the ideas from this chapter and run with them in your own projects.
There's a great deal more you can do. To get you started, there are some advanced modifications you
Add a new level.
Create a class to manage all the levels in the game.
Fire bullets in four directions.
Let's take a look!
Adding a new level
It's easy to add a new level to the game. The Library already contains a symbol called @qjcakjPsk.
The following steps describe how to use it to add a new level when the lh]uan has reached the
1. Modify the last code in the previous section so that it looks like this:
2. Save the @qjcakjKja[I]j]can*]o file and test the project.