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

Function startGame

assets/js/molegame.js:47–62  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

45}
46
47function startGame() {
48
49 scoreBoard.textContent = 0;
50 score = 0
51 timeUp = false;
52 peep();
53 setTimeout(() => {
54 timeUp = true;
55 if (score > hscore) {
56 console.log("score is greater");
57 highscore.textContent = score;
58 localStorage.setItem('highscore', score);
59 console.log("hscore:", hscore);
60 }
61 }, 10000)
62}
63
64function bonk(e) {
65 if (!e.isTrusted) return; //cheater

Callers

nothing calls this directly

Calls 1

peepFunction · 0.70

Tested by

no test coverage detected