Browse Source

restore rectangleOverlap

main
Stephanie Gredell 5 months ago
parent
commit
549a77be97
  1. 7
      static/script.js

7
static/script.js

@ -432,6 +432,13 @@ class Game { @@ -432,6 +432,13 @@ class Game {
}
function rectangleOverlap(rect1, rect2) {
return rect1.x < rect2.x + rect2.w &&
rect1.x + rect1.w > rect2.x &&
rect1.y < rect2.y + rect2.h &&
rect1.y + rect1.h > rect2.y;
}
const game = new Game({
canvasId: 'canvas',
chatInputId: 'msg',

Loading…
Cancel
Save