bludiste.zip

function pohybHrace(event){
    if(!bylPohyb && event.code == "ArrowDown"){
        // ukazkovy pohyb panacka dolu
        const cilovaY = player.y + 1
        const cilovaX = player.x
        if(mapa[cilovaY][cilovaX] == ' '){
            player.x = cilovaX
            player.y = cilovaY
        }
        bylPohyb = true
    }
}
 
document.addEventListener("keydown", pohybHrace);