Skip to content

Commit

Permalink
๐Ÿ› fix(game.js): fix typo in comment to improve code readability
Browse files Browse the repository at this point in the history
๐Ÿ› fix(score.js): fix incorrect property access in updateDialogScore method
  • Loading branch information
romantech committed Jan 29, 2024
1 parent 9b3c5fc commit eab5714
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/game.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class Game {
* */
const isHorizontalOverlap =
marioRect.left < obstacleRect.right && // ๋งˆ๋ฆฌ์˜ค๊ฐ€ ์žฅ์• ๋ฌผ ์˜ค๋ฅธ์ชฝ์—์„œ ๊ฒน์น˜๋Š” ๊ฒฝ์šฐ ๊ฒ€์‚ฌ
marioRect.right > obstacleRect.left; // ๋งˆ๋ฆฌ์˜ค๊ฐ€ ์žฅ์• ๋ฏˆ ์™ผ์ชฝ์—์„œ ๊ฒน์น˜๋Š” ๊ฒฝ์šฐ ๊ฒ€์‚ฌ
marioRect.right > obstacleRect.left; // ๋งˆ๋ฆฌ์˜ค๊ฐ€ ์žฅ์• ๋ฌผ ์™ผ์ชฝ์—์„œ ๊ฒน์น˜๋Š” ๊ฒฝ์šฐ ๊ฒ€์‚ฌ

const isVerticalOverlap =
marioRect.top < obstacleRect.bottom && // ๋งˆ๋ฆฌ์˜ค๊ฐ€ ์žฅ์• ๋ฌผ ์•„๋ž˜์—์„œ ๊ฒน์น˜๋Š” ๊ฒฝ์šฐ ๊ฒ€์‚ฌ
Expand Down
2 changes: 1 addition & 1 deletion src/score.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Score {
}

updateDialogScore() {
DomManager.dialogScore.textContent = String(this.score.score);
DomManager.dialogScore.textContent = String(this.score);
}

updateDisplay() {
Expand Down

0 comments on commit eab5714

Please sign in to comment.