Можете подсказать почему квадратик не двигается вниз и чему не видно последний ряд

<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <style>*{
    box-sizing: border-box;
}
body{
    margin: 0;
    background: #000;
}
.main{
    font-size: 0;
    width: 320px;
    height: 620px;
    margin: 100px auto 0;
    border: 10px solid silver;
}
.cell{
    width: 30px;
    height: 30px;
    border: 1px solid silver;
    display: inline-block;
}
.movingCell{
    background-color: blue;
}
.fixedCell{
    background-color: green;
}</style>
    <title>Tetris</title>
</head>
<body>
    <!-- 10x20px -->
    <div class="main">
        <div class="cell movingCell"></div>
        <div class="cell"></div>
        <div class="cell fixedCell"></div>
    </div>





    <script>var main = document.querySelector('.main')
var playfield =[
    [0,0,0,0,0,0,0,0,0,0],
    [0,0,0,0,0,0,0,0,0,0],
    [0,0,0,0,0,0,0,0,0,0],
    [0,0,0,0,0,0,0,0,0,0],
    [0,0,0,0,0,0,0,0,0,0],
    [0,0,0,0,0,1,0,0,0,0],
    [0,0,0,0,0,0,0,0,0,0],
    [0,0,0,0,0,0,0,0,0,0],
    [0,0,0,0,0,0,0,0,0,0],
    [0,0,0,0,0,0,0,0,0,0],
    [0,0,0,0,0,0,0,0,0,0],
    [0,0,0,0,0,0,0,0,0,0],
    [0,0,0,0,0,0,0,0,0,0],
    [0,0,0,0,0,0,0,0,0,0],
    [0,0,0,0,0,0,0,0,0,0],
    [0,0,0,0,0,0,0,0,0,0],
    [0,0,0,0,0,0,0,0,0,0],
    [0,0,0,0,0,0,0,0,0,0],
    [0,0,0,0,0,0,0,0,0,0],
];
var gameSpeed = 400;
function draw() {
    let mainInnerHTML =  "";
for (let y = 0; y < playfield.length; y++) {
    for (let x = 0; x < playfield[y].length; x++) {
        if (playfield[x][y] === 1) {
            mainInnerHTML += '<div class="cell movingCell"></div>';
        } else{
            mainInnerHTML += '<div class="cell"></div>';
        }
       
    }
}
main.innerHTML = mainInnerHTML;
}

function canTetromoveDown() {
    for (let y = 0; y >= 0; y--) {
        for (let x = 0; x < playfield[y].length; x++) {
            if (playfield[y][x] === 1){
                if(y === playfield.length - 1){
                    return false;
                }
            }
        }
    }
}


function moveTetroDown() {
    if(canTetromoveDown()){
        for (let y = playfield.length - 1; y >= 0; y--) {
            for (let x = 0; x < playfield[y].length; x++) {
                if (playfield[x][y] === 1){
                    playfield[x][y + 1] = 1;
                    playfield[x][y] = 0;
                }
            }
        }
    }
    return true;
    
}




draw();

function startGame() {
    moveTetroDown();
    draw();
    setTimeout(startGame, gameSpeed);
}


setTimeout(startGame, 300); </script>
</body>
</html>```

Ответы (0 шт):