12-09-2005, 05:28 AM
Can you explain how this works? You'll never get anywhere, if you don't slow down and think.
Code:
Declare Sub FloodFill(X, Y, Col)
Screen 13,,,1
Randomize Timer
Circle(160,100),50,31
For i=1 To 10
tAng!=Rnd*6.282
Tx=160+30*Sin(tAng!)
Ty=100+30*Cos(tAng!)
Circle(Tx,Ty),10,2+Int(rnd*14)
Next
FloodFill 160,100,1
Sleep
Sub FloodFill(X,Y,Col)
If Point(X,Y)>0 Then Exit Sub
Pset(X,Y),Col
FloodFill(X-1,Y,Col)
FloodFill(X+1,Y,Col)
FloodFill(X,Y-1,Col)
FloodFill(X,Y+1,Col)
End Sub