```
#Region Project Attributes
#MainFormWidth: 600
#MainFormHeight: 400
#End Region
Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Dim c As Canvas
Type crl(x As Float,y As Float,r As Int)
Dim circle_list As List
Dim t1, wiper As Timer
Dim wiperCD As Int = 80
Dim deg As Double = -90
Dim now_back As Boolean
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.SetFormStyle("UNIFIED")
MainForm.Show
c.Initialize("canvas")
circle_list.Initialize
MainForm.RootPane.AddNode(c,0,0,MainForm.RootPane.Width,MainForm.RootPane.Height)
t1.Initialize("t1",50)
t1.Enabled = True
wiper.Initialize("wiper",10)
End Sub
Sub t1_tick
'c.ClearRect(0,0,c.Width,c.Height)
fill_circles(Rnd(10,25))
wiperCD = wiperCD - 1
If wiperCD < 0 Then wiper.Enabled = True
End Sub
Sub wiper_tick
If deg > 90 Then now_back = True
If now_back = True Then deg = deg - 2 Else deg = deg + 2
If deg < -90 Then
wiper.Enabled = False
deg = -90
wiperCD = 80
now_back = False
Else
c.DrawRectRotated(MainForm.Width/2,0,20,MainForm.Height*2,fx.Colors.White,True,0,deg)
End If
End Sub
Sub fill_circles(amount As Int)
Dim overlap As Boolean
circle_list.Clear
Dim i As Int = 0
Do Until i = amount
Dim circle, old_crl As crl
circle.r = Rnd(2,25)
circle.x = Rnd(circle.r,MainForm.RootPane.Width-(circle.r*2))
circle.y = Rnd(circle.r,MainForm.RootPane.Height-(circle.r*2))
overlap = False
For j = 0 To circle_list.Size - 1
old_crl = circle_list.Get(j)
If distance_x(circle.x,old_crl.x,circle.r+old_crl.r) And distance_y(circle.y,old_crl.y,circle.r + old_crl.r) Then
overlap = True
Exit
End If
Next
If Not(overlap) Then
c.DrawCircle(circle.x,circle.y,circle.r,fx.Colors.ARGB(100,Rnd(0,255),Rnd(0,255),Rnd(0,255)),True,0)
circle_list.Add(circle)
i = i + 1
End If
Loop
End Sub
Sub distance_x(x1 As Float,x2 As Float,r2 As Int) As Boolean
Return(Abs(x1-x2)<r2)
End Sub
Sub distance_y(y1 As Float,y2 As Float,r2 As Int) As Boolean
Return(Abs(y1-y2)<r2)
End Sub
```