MCPcopy Create free account
hub / github.com/Vishal-raj-1/Awesome-JavaScript-Projects / randomNum

Function randomNum

assets/js/ludo.js:200–213  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

198 }
199}
200function randomNum() {
201 if (!clicked) {
202 num = Math.floor((Math.random() * 6) + 1);;
203 var dice = document.getElementById('dice');
204 dice.style.backgroundImage = "url(../assets/Images/ludo/" + num + ".jpg)";
205 clicked = true;
206 }
207 if (num != 6 && DontHaveOtherFree()) {
208 var bad = document.getElementById('badtext');
209 bad.innerText = "Unfortunatlly you stuck";
210 window.setTimeout(changePlayer, 1000);
211 clicked = false;
212 }
213}
214function randomMove(Color, paw) {
215 var text = document.getElementById('player');
216 NumOfPaw = paw;

Callers

nothing calls this directly

Calls 1

DontHaveOtherFreeFunction · 0.85

Tested by

no test coverage detected