'Gold Mining Simulation"
'By Ken G."
'Made on January 12, 2020.
'I might add more to this later, suggestions welcomes.
'Freeware
_TITLE "Gold Mining Simulation" PRINT " Gold Mining Simulation" PRINT " Keys: Speed Control = Up and Down Arrow Keys" PRINT " Pause (off/on) = Space Bar" PRINT " Sound (off/on) = S" PRINT " When the miner hits gold, he receives a random amount of money." PRINT " This is a non-stop simulation so press Esc or click X to end." INPUT " Press Enter to start.", bg$
lim = 50
start:
t = 0
snd$ = "On"
x = 400: y = 300
c1 = 156: c2 = 156: c3 = 12
again:
x = x + xx
y = y + yy
CircleFill x
, y
, 5, _RGB32(c1
, c2
, c3
) IF sd
= 1 THEN sd2
= 1: snd$
= "Off":
_TITLE "Speed: " + lim$
+ " Sound: " + snd$
+ " Money: " + m$
IF sd
= 2 THEN sd2
= 0: sd
= 0: snd$
= "On":
_TITLE "Speed: " + lim$
+ " Sound: " + snd$
+ " Money: " + m$
lim = lim - 5
_TITLE "Speed: " + lim$
+ " Sound: " + snd$
+ " Money: " + m$
lim = lim + 5
_TITLE "Speed: " + lim$
+ " Sound: " + snd$
+ " Money: " + m$
pausing:
going:
t = t + 1
LINE (x
- 5, y
- 5)-(x
+ 5, y
+ 5), _RGB32(128, 128, 6), BF
skip:
money = money + gd
_TITLE "Speed: " + lim$
+ " Sound: " + snd$
+ " Money: " + m$
' CX = center x coordinate
' CY = center y coordinate
' R = radius
' C = fill color
RadiusError = -Radius
X = Radius
Y = 0
LINE (CX
- X
, CY
)-(CX
+ X
, CY
), C
, BF
RadiusError = RadiusError + Y * 2 + 1
LINE (CX
- Y
, CY
- X
)-(CX
+ Y
, CY
- X
), C
, BF
LINE (CX
- Y
, CY
+ X
)-(CX
+ Y
, CY
+ X
), C
, BF
X = X - 1
RadiusError = RadiusError - X * 2
Y = Y + 1
LINE (CX
- X
, CY
- Y
)-(CX
+ X
, CY
- Y
), C
, BF
LINE (CX
- X
, CY
+ Y
)-(CX
+ X
, CY
+ Y
), C
, BF