Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- GraphicsWindow.Width=800
- GraphicsWindow.Height=600
- GraphicsWindow.MouseDown=MouseClick
- GraphicsWindow.MouseUp=MouseUp
- koniec=0
- punkty=0
- start=0
- stop=0
- czas=0
- wynik=0
- Sub Mouseclick
- GraphicsWindow.Clear()
- If(koniec=0) Then
- start=clock.ElapsedMilliseconds
- EndIf
- x= GraphicsWindow.MouseX
- y= GraphicsWindow.MouseY
- If(x > (x2) And x < (x2+50) And y > (y2) And y < (y2+50)) Then
- punkty=punkty+1
- Sound.PlayChime()
- Else
- Sound.PlayClick()
- EndIf
- koniec=koniec+1
- If(koniec=11) Then
- stop= Clock.ElapsedMilliseconds
- czas= ( stop - start )/1000
- wynik=(punkty/czas)*10
- wynik=math.Round(wynik)
- GraphicsWindow.ShowMessage("Otrzymałeś: "+punkty+"/" + (koniec-1) + " punktów "+"w czasie: " +czas + " sek twój wynik to: "+wynik,"WYNIK")
- Program.End()
- EndIf
- EndSub
- Sub MouseUp
- x2 = Math.GetRandomNumber(800)
- y2 = Math.GetRandomNumber(600)
- GraphicsWindow.BrushColor=GraphicsWindow.GetRandomColor()
- GraphicsWindow.FillRectangle(x2,y2,50,50)
- EndSub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement