The program begins by defining the variables used for the level names, the shape of the walls and the objects.
This data is read into arrays in lines 70 to 100
|
The above section of code introduces you to each new level by displaying the number of gems you have.
Lines 140 to 180 work out where the walls will be placed and the up facing arrow at the end of line 200 is produced by pressing [ALT] U
|
The program looks to the keyboard for input and moves your character in the direction of the cursor key you pressed.
If you press Q, the game will end.
This section also calculates how many gems you have.
|
Line 310 kills your character if it runs into a monster and the rest of the section erases and re-displays your character when it moves and records which level you are on
|
This final piece of code displays your score so far (based on the number of gems you have) and randomly calculates the co-ordinates for the walls
|
|