remove ghost func fix

 avatar
unknown
javascript
2 years ago
252 B
2
Indexable
function killGhost(nextLocation) {
  var ghostIdx = getGhostIdxByLocation(nextLocation); // in case this is giving the current ghost id
  // Removing ghost from array
  gGhosts.pop(ghostIdx)
  // increasing dead ghost counter. 
  gGame.deadGhosts++;
}