Hi ..
I am creating a game project , i am replicating the mini game from the cult of the lambs knucklebones.
my problem is when when i drag the rolled dice image to the column cell , it still rolls and give random value. How can i make it still without the randon roll on click ?
the code i used :
event.preventDefault();
});
function allowDrop(ev) {
ev.preventDefault();
}
function drag(ev) {
ev.dataTransfer.setData("text", ev.target.id);
}
function drop(ev) {
ev.preventDefault();
const data = ev.dataTransfer.getData("text");
const diceValue = document.getElementById(data);
diceValue.classList.add("block");
ev.target.appendChild(diceValue);
} ```