} else {
climbonto(i); reach(i+1); nextStep(j); /*monkeygoto(-1,i); nextStep(j); monkeygoto(0,i); nextStep(j); movebox(-1,i); nextStep(j); movebox(0,i); nextStep(j);*/
reach(i+1); nextStep(j); /*climbdown(i); nextStep(j);*/
}
else if(States[i].box==1) {
/*monkeygoto(-1,i); nextStep(j);*/ monkeygoto(1,i); nextStep(j); movebox(0,i); nextStep(j); climbonto(i);
}
}
reach(i+1); nextStep(j);
else /*box==-1*/ { }
monkeygoto(-1,i); nextStep(j); movebox(0,i); nextStep(j); climbonto(i); reach(i+1); nextStep(j);
}
/*end if*/
if(States[i].monkey==-1)
{
if(States[i].box==-1) {
if(States[i].monbox==-1) { } else {
climbdown(i);
movebox(0,i); nextStep(j); climbonto(i); reach(i+1); nextStep(j);
}
}
}
nextStep(j); movebox(0,i); nextStep(j); climbonto(i); reach(i+1); nextStep(j);
else if(States[i].box==0) { } else { }
monkeygoto(1,i); nextStep(j); movebox(0,i); nextStep(j); climbonto(i); reach(i+1); nextStep(j); monkeygoto(0,i); nextStep(j); climbonto(i); reach(i+1); nextStep(j);
/*end if*/
if(States[i].monkey==1)
{
if (States[i].box==1) { }
else if(States[i].box==-1) {
monkeygoto(-1,i); nextStep(j); movebox(0,i); nextStep(j); movebox(0,i); nextStep(j); climbonto(i);
if(States[i].monbox==-1) { } else { }
climbdown(i); nextStep(j); movebox(0,i); nextStep(j); climbonto(i); reach(i+1);
nextStep(j); movebox(0,i); nextStep(j); climbonto(i); reach(i+1); nextStep(j);
} else { }
reach(i+1); nextStep(j);
monkeygoto(0,i); nextStep(j); movebox(0,i); nextStep(j); climbonto(i); reach(i+1); nextStep(j);
}
/*end if*/
}/*end nextStep*/ int main() {
States[0].monkey=-1; States[0].box=1; States[0].banana=0; States[0].monbox=-1; nextStep(0); }
五、实验截图