daily pastebin goal
92%
SHARE
TWEET

Untitled

a guest Apr 21st, 2017 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. GraphicsWindow.Width=800
  2. GraphicsWindow.Height=600
  3. GraphicsWindow.MouseDown=MouseClick
  4. GraphicsWindow.MouseUp=MouseUp
  5. koniec=0
  6. punkty=0
  7. start=0
  8. stop=0
  9. czas=0
  10. wynik=0
  11. Sub Mouseclick
  12.   GraphicsWindow.Clear()
  13.   If(koniec=0) Then
  14.     start=clock.ElapsedMilliseconds
  15.   EndIf
  16.   x= GraphicsWindow.MouseX
  17.   y= GraphicsWindow.MouseY
  18.   If(x > (x2) And x < (x2+50) And y > (y2) And y < (y2+50)) Then
  19.     punkty=punkty+1
  20.     Sound.PlayChime()
  21.  Else
  22.    Sound.PlayClick()
  23.   EndIf
  24.   koniec=koniec+1
  25.   If(koniec=11) Then
  26.     stop= Clock.ElapsedMilliseconds
  27.     czas= ( stop - start )/1000
  28.     wynik=(punkty/czas)*10
  29.     wynik=math.Round(wynik)
  30.     GraphicsWindow.ShowMessage("Otrzymałeś: "+punkty+"/" + (koniec-1) + " punktów "+"w czasie: " +czas + " sek twój wynik to: "+wynik,"WYNIK")
  31.   Program.End()
  32. EndIf
  33. EndSub
  34.  
  35. Sub MouseUp
  36.   x2 = Math.GetRandomNumber(800)
  37.   y2 = Math.GetRandomNumber(600)
  38.   GraphicsWindow.BrushColor=GraphicsWindow.GetRandomColor()
  39.   GraphicsWindow.FillRectangle(x2,y2,50,50)
  40. EndSub
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top