κ.τ.λ
here's the proggam : :c-^_^:
GraphicsWindow.BackgroundColor = "LightYellow"
GraphicsWindow.Width = "700"
GraphicsWindow.Height = "600"
start :
For i = 1 To 15
balls = Shapes.AddEllipse(30,30)
x = Math.GetRandomNumber(470)
xa[i] = x
Array.ContainsIndex(xa,i)
y = Math.GetRandomNumber(500)
ya[i] = y
Array.ContainsIndex(ya,i)
For k=1 To i-1
l = (xa[k]-xa[i]+10)
p = (ya[k]-ya[i]+10)
If Math.abs(xa[k]-xa[i])<60 And math.Abs(ya[k]-ya[i])<60 Then
Shapes.move(balls,xa[i]+l,ya[i]+p)
Else
Shapes.move(balls,xa[i],ya[i])
EndIf
EndFor
EndFor
If Math.Abs(xa[k]-xa[i])<60 And Math.Abs(ya[k]-ya[i])<60 Then
Goto start
EndIf
GraphicsWindow.DrawRectangle(510,1,80,900)
GraphicsWindow.BrushColor = "LightGreen"
GraphicsWindow.FillRectangle(510,1,80,900)
GraphicsWindow.BrushColor = "DarkRed"
GraphicsWindow.DrawBoundText(550,20,90,"Hits")
For i = 1 To 7
k = Math.GetRandomNumber(50)*10
n = Math.GetRandomNumber(35)*10
Shapes.Animate(balls,k,n,1000)
xk[i] = k
Array.ContainsIndex(xk,i)
xn[i] = n
Array.ContainsIndex(xn,i)
EndFor
-->> So far I want someone to help me by telling me HOW I can wag all the balls and not only one:c-mad:. then HOW can I make it don't concur. I've tried once as you see but did not succeed
:((
Thanks for reading me,
George , beginner , 13
Edited by Alexander, 20 December 2010 - 11:27 PM.
Reformatted bbcode


Sign In
Create Account

Back to top










