9-4 浜辺を目指して①

解説動画

解答コード

function floor(depth: number, width: number) {
    for (let i = 0; i < width; i++) {
        for (let j = 0; j < depth; j++) {
            agent.move(FORWARD, 1);
            agent.place(DOWN);
        }
        agent.move(BACK, depth);
        agent.move(LEFT, 1);
    }
}

player.onChat("9-4", function (depth, width) {
    floor(depth, width);
});