Sub switch
Dim i As Int = Rnd(1,5)
Select i
Case 1
For y=0 To 8
drawLine(0,y,31,y,wheel(y*32))
drawLine(0,y-1,31,y-1,Array As Int(0,0,0))
show
Sleep(40)
Next
Case 2
For y=8 To -1 Step -1
drawLine(0,y,31,y,wheel(y*32))
drawLine(0,y+1,31,y+1,Array As Int(0,0,0))
show
Sleep(40)
Next
Case 3
For x=0 To 32
drawLine(x,0,x,7,wheel(x*7))
drawLine(x-1,0,x-1,7,Array As Int(0,0,0))
show
Sleep(20)
Next
Case 4
For x=32 To -1 Step-1
drawLine(x,0,x,7,wheel(x*7))
drawLine(x+1,0,x+1,7,Array As Int(0,0,0))
show
Sleep(20)
Next
End Select
CallSubDelayed(Main,"switchFinish")
End Sub