Let's say that i have a method goTo(int finalx, finaly, int currx, int curry) and a string that maybe looks like this:
String sequence = "0001112122"
The above means that 00->01->11->21->22
And this is how it should look like:
goTo(0,1,0,0);
goTo(1,1,0,1);
goTo(2,1,1,1);
goTo(2,2,2,1);
How can i write out the above using a foor loop maybe to iterate through the string an input the specific numbers at the right place?
Notice that sequence may not always be that specific length it could be a different sequence string.
Thanks in advance!