Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- screenres 640,480,32
- dim as string key, msg
- dim as integer i, x, y, r, g, b, strt, stp, counter, total
- randomize timer
- strt=timer
- draw string ( 10, 10), "Circles displayed: 0"
- draw string (10,30), "Seconds elapsed: 0"
- do
- x = rnd * 620 + 10
- y = rnd * 420 + 50
- r = rnd * 255 + 20
- g = rnd * 255 + 20
- b = rnd * 255 + 20
- circle(x,y), 10, rgb(r,g,b),,,,F
- line(320,240)-(x,y),rgb(r,g,b)
- sleep(50)
- counter=counter+1
- select case counter
- case 100
- total = total + counter
- msg = "Circles displayed: " & total
- cls
- draw string ( 10, 10), msg
- stp = timer
- draw string (10,30), "Seconds elapsed: " & stp - strt
- counter = 0
- end select
- key=inkey
- loop until key=chr(255,107)
- end
Add Comment
Please, Sign In to add comment