Private Declare Function ExtFloodFill Lib "GDI32" (ByVal hDC As Long, ByVal X As Long, ByVal Y As Long, ByVal colorCode As Long, ByVal fillType As Long) As Long
Public LEV As String
Public FLev As String
Public fx As Single, fy As Single
Public SelCount
Public TotalP As Double
Public NOL
Private Sub Form_Load()
NOL = 3
NewLev
End Sub
Function GetColor(ByVal n As Integer) As Long
Select Case n
Case 1: GetColor = vbRed
Case 2: GetColor = vbYellow
Case 3: GetColor = vbGreen
Case 4: GetColor = vbCyan
Case 5: GetColor = vbBlue
Case 6: GetColor = vbMagenta
End Select
End Function
Private Sub ResLev()
On Error Resume Next
TotalP = 0
SelCount = 0
fx = -1
fy = -1
LEV = FLev
P.Enabled = True
PN
End Sub
Private Sub NewLev()
On Error Resume Next
TotalP = 0
SelCount = 0
fx = -1
fy = -1
Randomize
FLev = ""
For X = 0 To 9
For Y = 9 To 0 Step -1
Randomize
FLev = FLev & "|" & Int(1 + (Rnd * NOL)) & "," & X & "," & Y