From 549a77be9773b0261a752e300f80f6e05c3efaed Mon Sep 17 00:00:00 2001 From: Stephanie Gredell Date: Fri, 29 Aug 2025 00:28:36 -0700 Subject: [PATCH] restore rectangleOverlap --- static/script.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/static/script.js b/static/script.js index 4fb0d62..3e7b3ca 100644 --- a/static/script.js +++ b/static/script.js @@ -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',