What i need to do is parse an integer to a "library" of co-ordinates. This integer allows for a random co-ordinate to be chosen. The "Library" i mentioned is shown below
Public Function Hit(ByVal rnd As Integer) Select Case rnd case 0 return "(0,0)" case 1 return "(0,1)" End Select End Function
in total there are 99 different combinations of co-ordinates.
the return of this function needs to be recognised as an array item as shown below.
If grid(xM, yM) = grid(*returned value*) Then grid(xM, yM) = 2 Else grid(xM, yM) = 1 End If
How can this be done?
I am either looking to convert the string "(0,0)" to grid(0,0) or can use another method to lookup the co-ordinates.
Thankyou in advance