aspでランダムパケットプログラムを実現するコード
929 ワード
Function makegroup(teams() As String) As String
' : teams 32 .( :teams 0 )
' .
' .
Dim tvar As Integer, returnstr As String, tmove As Integer, temp As Integer
' .
Randomize (Timer)
For tvar = 1 To 32 ' 32
If (tvar - 1) Mod 4 = 0 Then
' returnstr .
returnstr = returnstr & vbCrLf & Chr(Asc("A") + (tvar \ 4)) & " :"
End If
tmove = Int(Rnd * (33 - tvar))
returnstr = returnstr & teams(tmove) & "."
For temp = tmove To 30
' .
teams(temp) = teams(temp + 1)
Next temp
Next tvar
' .
makegroup = returnstr
End Function