6-9 導きの光③
解説動画
※回答のブロックIDは236→237、35→41が正しいです。
解答コード
player.onChat("6-9", function () {
do {
agent.move(FORWARD, 1);
} while (!(agent.inspect(AgentInspection.Block, DOWN) == 41));
do {
agent.move(RIGHT, 1);
} while (!(agent.inspect(AgentInspection.Block, DOWN) == 22));
do {
agent.move(BACK, 1);
} while (!(agent.inspect(AgentInspection.Block, DOWN) == 152));
do {
agent.move(LEFT, 1);
} while (!(agent.inspect(AgentInspection.Block, DOWN) == 57));
});