*{
    margin: 0;
    padding: 0;
}

#game{
    width: 100vw;
    height: 300px;

    border: 1px solid black;
}

#player{
    width: 20px;
    height: 50px;

    background: red;
    
    position: relative;
    top: 250px;
    left: 10px;
}
.go{
    animation: player 500ms infinite;
}
@keyframes player{
    from{
        top: 250px;
    }
    30%{
        top: 200px;
    }
    70%{
        top: 200px;
    }
    100%{
        top: 250px;
    }
}

#block{
    width: 20px;
    height: 20px;

    background: blue;

    position: relative;
    top: 230px;
    left: 100vw;

    animation: block 2s infinite linear;
}

@keyframes block{
    from{
        right: 100vw;
    }
    to{
        left:-30px;
    }
}