Hi im having a very hard time getting through Mole unearther step 9 calling my function for onBurrowHit. I’ll post my code below.
const onBurrowHit = key => {
if (isPaused === false) {
// check each burrow's location if the user is hitting the corresponding key
// and run the handler to determine if user should get a reward or penalty
if (currentBurrowKey === key) {
applyHitReward()
this.relocateMole()
} else {
applyMissPenalty()
}
if (Phaser.Input.Keyboard.JustDown(gameState.jKey)) {
onBurrowHit('j')
} else if (Phaser.Input.Keyboard.JustDown(gameState.kKey)) {
onBurrowHit('k')
} else if (Phaser.Input.Keyboard.JustDown(gameState.lKey)) {
onBurrowHit('l')
}
if (key === currentBurrowKey) {
applyHitReward()
this.relocateMole();
} else {
applyMissPenalty();
}
}
};