DIAMOND MINER
by Paul Vandenberg
for Commodore 64
published in "Your Computer" magazine (Australia), 1985

This program lets you play Diamond Dan, a diamond miner. Your boss wants
you to mine for as many diamonds as possible, and to speed you up a bit he
has imposed a time limit within which to collect individual stones. The
limit starts at 14 seconds, but if you get too fast - picking up a diamond
in, say, five seconds - the boss may lower your time limit.
  You must also be careful to collect only the white diamonds; the green
ones are booby-trapped and will cost you a life. Watch out for rocks, as
they will also reduce your life expectancy. The worst of all dangers are
the walls: bumping into them will kill you instantly.
  Added to all these dangers are red crosses which, when landed on, will
move you randomly to another area of the mine.
  With this game you can plug the joystick into either port. If you don't
have a joystick, use the following keys instead:

    A = left
    D = right
    W = up
    X = down

Paul Vandenberg
Cabramatta, NSW

[This program relied on having the old C64 kernel and did not work
properly under the new kernel. Lines 100 and 115 required modification to
ensure compatibility.

100:     clear screen
101-103: draw walls
105-106: place 5 white diamonds
     (cl= 1 means white,       c= 90 means diamond.)
109: do {
109: for f=1 to 15
 110: if ti >= tl then gosub 8000
 111: erase player
     (cl= 0 means black,       c= 32 means space  .)
 111-114: move player
  a= 9="W", j1/2=up
  a=23="X", j1/2=up
  a=10="A", j1/2=up
  a=18="D", j1/2=up
 115: read field
 116: consequences of hitting purple
  game over
 117: consequences of hitting dark blue
 118: consequences of hitting white
 119: consequences of hitting green
 120: consequences of hitting pink
 121: cl=14 must mean light blue,  c= 42 means "*".
 122: if ti$="000015" then gosub 8000
 124: print status bar
129: next f
130: does  (100%) place 1 white       (cl= 1) diamond (c= 90) (normal).
131: does  (100%) place 4 dark blue   (cl= 6) rocks   (c=224).
132: does  (100%) place 1 light green (cl= 5) diamond (c= 90) (booby-trapped).
133: might ( 20%) place 1 pink        (cl=10) X-cross (c= 86) (teleport).
160: } loop]

END OF DOCUMENT-----------------------------------------------------------

