Skip to content

Commit

Permalink
Fixing Mailman.js (#2761)
Browse files Browse the repository at this point in the history
fixing the game
  • Loading branch information
EerierGosling authored Dec 27, 2024
1 parent 16c753d commit 03be2c9
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions games/mailman.js
Original file line number Diff line number Diff line change
Expand Up @@ -347,19 +347,19 @@ function checkHit() {



function checkHit() {
const badBoxHitbox = tilesWith(BADBOX).length;
const evilBoxHitbox = tilesWith(EVILBOX).length;
// function checkHit() {
// const badBoxHitbox = tilesWith(BADBOX).length;
// const evilBoxHitbox = tilesWith(EVILBOX).length;

const badBoxDamage = tilesWith(BADBOX, player).length;
const evilBoxDamage = tilesWith(EVILBOX, player).length;
// const badBoxDamage = tilesWith(BADBOX, player).length;
// const evilBoxDamage = tilesWith(EVILBOX, player).length;

// Get the current level's map
const currentLevelMap = levels[level];
// // Get the current level's map
// const currentLevelMap = levels[level];

if (badBoxDamage > 0 || evilBoxDamage > 0) {
// You're being hit by either BADBOX or EVILBOX
setMap(currentLevelMap); // Reset the current level
// console.log("HIT!");
}
}
// if (badBoxDamage > 0 || evilBoxDamage > 0) {
// // You're being hit by either BADBOX or EVILBOX
// setMap(currentLevelMap); // Reset the current level
// // console.log("HIT!");
// }
// }

0 comments on commit 03be2c9

Please sign in to comment.