13-3 白くしずかな村③

解説動画

解答コード

function cloneLine13_3() {
    arr.forEach(function (element) {
        agent.setItem(element, 1, 1);
        agent.move(FORWARD, 1);
        agent.place(DOWN);
    });
}

player.onChat("13-3", function () {

    // 左から2列目
    arr = [
        Block.LimeWool,
        Block.RedWool,
        Block.LimeWool,
        Block.RedWool,
        Block.LimeWool,
        Block.LimeWool,
        Block.RedWool
    ];

    cloneLine13_3();

    // 左から6列目に移動
    agent.move(BACK, 7);
    agent.move(RIGHT, 4);

    // 左から6列目
    arr = [
        Block.YellowWool,
        Block.RedWool,
        Block.LimeWool,
        Block.LimeWool,
        Block.RedWool,
        Block.YellowWool,
        Block.YellowWool
    ];

    cloneLine13_3();
});