C
Confessor
I have two *very* similar groups of related procedures in my program, and
I'd like to try combining them, but I'm running into one big problem.
Private Sub TileSearchCluster(ByVal PossibleClusterTile1 As HexicTile,
ByVal PossibleClusterTile2 As HexicTile, ByVal PossibleClusterTile3 As
HexicTile)
If Equals(PossibleClusterTile1.Color, PossibleClusterTile2.Color) Then
If Equals(PossibleClusterTile1.Color, PossibleClusterTile3.Color) Then
If TileSearchMode = "Error Checking" Then
TileLabel(a).Text = "X"
TileLabel(b).Text = "X"
TileLabel(c).Text = "X"
ErrorsPresent = True
Exit Sub
End If
End If
End If
End Sub
The PossibleClusterTile variables are members of an array of the form
Tile(1 To 85), which I gathered from TileLabel(1 To 85).BackColor using a
For/Next loop.
Somehow, I need to make TileLabel(a), (b), and (c) reference the indices of
the PossibleClusterTile variables.
I'd like to try combining them, but I'm running into one big problem.
Private Sub TileSearchCluster(ByVal PossibleClusterTile1 As HexicTile,
ByVal PossibleClusterTile2 As HexicTile, ByVal PossibleClusterTile3 As
HexicTile)
If Equals(PossibleClusterTile1.Color, PossibleClusterTile2.Color) Then
If Equals(PossibleClusterTile1.Color, PossibleClusterTile3.Color) Then
If TileSearchMode = "Error Checking" Then
TileLabel(a).Text = "X"
TileLabel(b).Text = "X"
TileLabel(c).Text = "X"
ErrorsPresent = True
Exit Sub
End If
End If
End If
End Sub
The PossibleClusterTile variables are members of an array of the form
Tile(1 To 85), which I gathered from TileLabel(1 To 85).BackColor using a
For/Next loop.
Somehow, I need to make TileLabel(a), (b), and (c) reference the indices of
the PossibleClusterTile variables.