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

Function checkForWin

assets/js/Pacman.js:226–232  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

224
225 //check for a win - more is when this score is reached
226 function checkForWin() {
227 if (score === 274) {
228 ghosts.forEach(ghost => clearInterval(ghost.timerId))
229 document.removeEventListener('keyup', movePacman)
230 setTimeout(function(){ alert("You have WON!"); }, 500)
231 }
232 }
233})
234

Callers 1

movePacmanFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected