
previous

page 19
next
cont()
function cont() {
g_running=true;
Hide('run'); Hide('cont'); Show('stop');
one_step();
}
g_running=true;
Hide('run'); Hide('cont'); Show('stop');
one_step();
}
one_step()
function one_step() {
if (g_running) {
fd(); g_k++;
if (g_k==g_numbers[g_j]) {
g_j++; g_k=0; rt();
}
if (g_j==5) {
g_i++; g_j=0
}
robot();
if (g_i<4) {
g_timer=setTimeout(one_step,200);
} else {
stop();
}
}
}
if (g_running) {
fd(); g_k++;
if (g_k==g_numbers[g_j]) {
g_j++; g_k=0; rt();
}
if (g_j==5) {
g_i++; g_j=0
}
robot();
if (g_i<4) {
g_timer=setTimeout(one_step,200);
} else {
stop();
}
}
}
previous
next