Hello,
I am trying to figure out how to set integers for a robot to perform different tasks. For example, if
x=1 it will perform task one; if
x=2 it will perform task two. So to put this all together for the function that I want it to perform, it is supposed to do task one first. When task one is done, the computer does a
x++ to increase the value by one so it can go to perform tasks 2. I tried it my self but have come to no avail. The following is some of my code, which includes a main method file and a resource class file; the imported files are irrelevant.
Resource Class File snippet:
Code:
public void task1(int numSpa, int numBeep)
{
move();
jumpRight();
sprint(numSpa);
pick(numBeep);
turnAround();
sprint(numSpa);
jumpLeft();
move();
put(numBeep);
turnAround();
move();
}
EDIT:
I tried incorporating the
for statement, such as
for(int r=0; r<3; r++/*C++?*/),and even tried to do this:
x=1="task1"