Private Sub Form_Click() Dim d As String, l As Long, i As Long, dc As Boolean Dim a0 As Long, a1 As Long, a2 As Long, a3 As Long, a4 As Long a0 = 0: a1 = 0: a2 = 0: a3 = 0: a4 = 0 Open App.Path & "\一横场景.dat" For Random As #1 Len = 22 For l = 1 To 59085 Get #1, l, d dc = True For i = 0 To 4 If Mid$(d, i * 4 + 1, 1) <> Mid$(d, i * 4 + 4, 1) Or _ Mid$(d, i * 4 + 2, 1) <> Mid$(d, i * 4 + 3, 1) Then _ dc = False: Exit For Next i If dc = True Then a0 = a0 + 1 Open App.Path & "\一横对称场景.dat" For Random As #2 Len = 22 Put #2, a0, d Close #2 ElseIf dc = False Then If Mid$(d, 1, 1) = "4" Or Mid$(d, 3, 1) = "4" Then a1 = a1 + 1 Open App.Path & "\一横一层场景.dat" For Random As #2 Len = 22 Put #2, a1, d Close #2 ElseIf Mid$(d, 5, 1) = "4" Or Mid$(d, 7, 1) = "4" Then a2 = a2 + 1 Open App.Path & "\一横二层场景.dat" For Random As #2 Len = 22 Put #2, a2, d Close #2 ElseIf Mid$(d, 9, 1) = "4" Or Mid$(d, 11, 1) = "4" Then a3 = a3 + 1 Open App.Path & "\一横三层场景.dat" For Random As #2 Len = 22 Put #2, a3, d Close #2 ElseIf Mid$(d, 13, 1) = "4" Or Mid$(d, 15, 1) = "4" Then a4 = a4 + 1 Open App.Path & "\一横四层场景.dat" For Random As #2 Len = 22 Put #2, a4, d Close #2 End If End If Next l Close #1 Text1.Text = a0 & "\" & a1 & "\" & a2 & "\" & a3 & "\" & a4 Text2.Text = "End" End Sub
|