11-20-2022, 05:54 PM
Fun with Day 015 word:
Code: (Select All)
_Title "PSet or PReset" ' b+ 2022-11-20
Screen _NewImage(800, 600, 32)
_ScreenMove 200, 50
Do
If lc Mod 200 = 0 Then
lc = 0
c1~& = _RGB32(Rnd * 200 + 55, Rnd * 255, Rnd * 255)
Color , _RGB32(255 - _Red32(c1~&), 255 - _Blue32(c1~&), 255 - _Green32(c1~&))
Cls
End If
box Rnd * _Width - 80, Rnd * _Height - 60, Rnd * 160 + 1, Rnd * 120 + 1, c1~&
_Limit 10
lc = lc + 1
Loop Until _KeyDown(27)
Sub box (x, y, w, h, c~&)
For yy = y To y + h
For xx = x To x + w
If Point(xx, yy) = c~& Then PReset (xx, yy) Else PSet (xx, yy), c~&
Next
Next
End Sub
b = b + ...