愤怒鸟抓猪游戏解答

连结: 愤怒鸟抓猪游戏

1.moveForward();moveForward();2.moveForward();moveForward();moveForward();3.moveForward();moveForward();turnRight();moveForward();4.moveForward();turnLeft();moveForward();turnRight();moveForward();5.turnRight();moveForward();turnLeft();moveForward();moveForward();moveForward();turnLeft();moveForward();6.for (var count = 0; count < 5; count++) {    moveForward();}7.turnRight();for (var count = 0; count < 5; count++) {    moveForward();}8.for (var count = 0; count < 4; count++) {    moveForward();}turnLeft();for (var count2 = 0; count2 < 5; count2++) {    moveForward();}9.for (var count2 = 0; count2 < 3; count2++) {    for (var count = 0; count < 2; count++) {        moveForward();    }    turnRight();}10.while (notFinished()) {    moveForward();}11.while (notFinished()) {    moveForward();    moveForward();    turnLeft();}12.while (notFinished()) {    moveForward();    turnLeft();    moveForward();    turnRight();}13.while (notFinished()) {    turnRight();    moveForward();    turnLeft();    moveForward();}14.while (notFinished()) {    moveForward();    if (isPathLeft()) {        turnLeft();    }}15.while (notFinished()) {    moveForward();    if (isPathRight()) {        turnRight();    }}16.while (notFinished()) {    moveForward();    if (isPathLeft()) {        turnLeft();    }}17.while (notFinished()) {    moveForward();    if (isPathRight()) {        turnRight();    }}18.while (notFinished()) {    if (isPathForward()) {        moveForward();    } else {        turnLeft();    }}19.while (notFinished()) {    if (isPathForward()) {        moveForward();    } else {        turnRight();    }}20.while (notFinished()) {    if (isPathForward()) {        moveForward();    } else {        if (isPathRight()) {            turnRight();        } else {            turnLeft();        }    }}

关于作者: 网站小编

码农网专注IT技术教程资源分享平台,学习资源下载网站,58码农网包含计算机技术、网站程序源码下载、编程技术论坛、互联网资源下载等产品服务,提供原创、优质、完整内容的专业码农交流分享平台。

热门文章