Skip to content

Commit

Permalink
Fixed collision bug
Browse files Browse the repository at this point in the history
  • Loading branch information
SamanthaSmith04 committed Sep 9, 2024
1 parent 1554009 commit 5d95de6
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -349,12 +349,8 @@ function hitGuard() {
}

function checkGuard(playerRow, playerCol) {
if (currentBoard[playerRow][playerCol] == 3 || currentBoard[playerRow][playerCol] == 6){
if (currentBoard[playerRow][playerCol] == 3 || currentBoard[playerRow][playerCol] == 6 || currentBoard[playerRow][playerCol] == 7 || currentBoard[playerRow][playerCol] == 5){
this.hitGuard();
} else if (playerRow > 0) {
if (currentBoard[playerRow+1][playerCol] == 3 || currentBoard[playerRow][playerCol] == 6){
this.hitGuard();
}
}
}

Expand Down

0 comments on commit 5d95de6

Please sign in to comment.