I'm not quite sure that this applies to everything you ask for, but perhaps this will give you an idea.
EDIT: based on an updated question, I have another solution. This requires an understanding of two-dimensional arrays in programming. You simply load all the "coordinates" into the array, and then repeat them and perform the operations in the same order in which they are entered into the array.
Sub Main()
' multi-dimensional array of moves (there are plenty of way to create this object if this is confusing)
Dim myList(,) As Object = New Object(,) { _
{"l", 5}, _
{"d", 3}, _
{"l", 21}, _
{"u", 5} _
}
' iterate the array and perform the moves.
For x As Integer = 0 To myList.GetUpperBound(0)
' getting coordinates from the first & second dimension
basicmove(myList(x, 0), myList(x, 1))
Next
Console.ReadLine()
End Sub
Private Sub basicmove(ByVal a As String, ByVal b As Integer)
Console.WriteLine("param1:" & a & ",param2:" & b)
End Sub
source
share