9-5 浜辺を目指して②

解説動画

解答コード

function floor2(depth: number, width: number, typeOfBlock: number) {
    for (let i = 0; i < width; i++) {
        for(let j = 0; j < depth; j++) {
            agent.setItem(typeOfBlock, 64, 1);
            agent.move(FORWARD, 1);
            agent.place(DOWN);
        }
        agent.move(BACK, depth);
        agent.move(RIGHT, 1);
    }
}

player.onChat("9-5", function (height, width, steps) {
    stairs(height, width, steps);
});