08-15-2022, 12:29 AM
OK here is my hat in the ring:
Code: (Select All)
_Title "test diamond" 'b+ 2022-08-14
Randomize Timer
Screen _NewImage(800, 600, 32)
drawDiamond 400, 300, 200, 400, &HFF990000
Print "press any to see a diamond mine!"
Sleep
Cls
While _KeyDown(27) = 0
drawDiamond Rnd * 800, Rnd * 600, Rnd * 100, Rnd * 100, _RGB32(Rnd * 255, Rnd * 255, Rnd * 255)
_Display
_Limit 30
Wend
Sub drawDiamond (x, y, w, h, K As _Unsigned Long)
For xx = 0 To w / 2
yy = h / 2 - h / w * xx
Line (x + xx, y + yy)-Step(0, -2 * yy), K
Line (x - xx, y + yy)-Step(0, -2 * yy), K
Next
End Sub
b = b + ...