about summary refs log tree commit diff stats
path: root/js
diff options
context:
space:
mode:
authorelioat <elioat@tilde.institute>2023-12-29 16:58:24 -0500
committerelioat <elioat@tilde.institute>2023-12-29 16:58:24 -0500
commitc03c6131d37c95bda51acce1c86f93769285ec1f (patch)
treee934ff354b0f42a81f521eb0bbedd70f99baded4 /js
parent9f8a386b07f0e4f6a7ad297dfed4264e18d358db (diff)
downloadtour-c03c6131d37c95bda51acce1c86f93769285ec1f.tar.gz
*
Diffstat (limited to 'js')
-rw-r--r--js/game-frame/game.js17
-rw-r--r--js/game-frame/index.html4
2 files changed, 0 insertions, 21 deletions
diff --git a/js/game-frame/game.js b/js/game-frame/game.js
index e64bfa7..b0f3fb6 100644
--- a/js/game-frame/game.js
+++ b/js/game-frame/game.js
@@ -341,20 +341,3 @@ window.addEventListener('keydown', (e) => {
       player.y = newY;
     }
 });
-
-canvas.addEventListener('click', function(event) {
-  // Calculate the mouse position
-  var rect = canvas.getBoundingClientRect();
-  var mouseX = Math.round(event.clientX - rect.left);
-  var mouseY = Math.round(event.clientY - rect.top);
-
-  // Calculate the map coordinates
-  var mapX = Math.floor(mouseX / TILE_SIZE);
-  var mapY = Math.floor(mouseY / TILE_SIZE);
-
-  // Write the map coordinates to the DOM element
-  document.getElementById('coordinates').innerText = 'Map grid: x ' + mapX + ', y ' + mapY;
-
-  // Write the canvas coordinates to the DOM element
-  document.getElementById('canvasCoordinates').innerText = 'Canvas: x ' + mouseX + ', y ' + mouseY;
-});
\ No newline at end of file
diff --git a/js/game-frame/index.html b/js/game-frame/index.html
index 8a53a06..ec1826a 100644
--- a/js/game-frame/index.html
+++ b/js/game-frame/index.html
@@ -11,10 +11,6 @@
         <p id="stats"></p>
         <canvas id="gameCanvas"></canvas>
         <p id="dialog"></p>
-        <ul>
-            <li id="coordinates"></li>
-            <li id="canvasCoordinates"></li>
-        </ul>
     </main>
     <script src="game.js"></script>
 </body>