about summary refs log tree commit diff stats
path: root/html/rogue/js/hexGrid.js
diff options
context:
space:
mode:
authorelioat <elioat@tilde.institute>2024-12-27 08:10:16 -0500
committerelioat <elioat@tilde.institute>2024-12-27 08:10:16 -0500
commitcbec006c83cbd51a8586ec8b4360b3e197e5d634 (patch)
treecef3d7a594fa7854cfa98d74c1ae424f9cc32181 /html/rogue/js/hexGrid.js
parentea50f9ee0875b9230174996af0f92922f747b974 (diff)
downloadtour-cbec006c83cbd51a8586ec8b4360b3e197e5d634.tar.gz
*
Diffstat (limited to 'html/rogue/js/hexGrid.js')
-rw-r--r--html/rogue/js/hexGrid.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/html/rogue/js/hexGrid.js b/html/rogue/js/hexGrid.js
index c45c981..0d4d81f 100644
--- a/html/rogue/js/hexGrid.js
+++ b/html/rogue/js/hexGrid.js
@@ -1,13 +1,12 @@
 // Hex grid utilities and calculations
 const HexGrid = {
-    SIZE: 40,
+    get SIZE() { return Config.hex.SIZE },
+    get WIDTH() { return Config.hex.WIDTH },
+    get HEIGHT() { return Config.hex.HEIGHT },
+    get GRID_SIZE() { return Config.hex.GRID_SIZE },
     COLOR: Config.colors.GRID,
-    GRID_SIZE: 10,
     IMPASSABLE_COLOR: Config.colors.BACKGROUND,
 
-    get WIDTH() { return this.SIZE * 2 },
-    get HEIGHT() { return Math.sqrt(3) * this.SIZE },
-
     // Convert hex coordinates to pixel coordinates
     toPixel(hex) {
         const x = this.SIZE * (3/2 * hex.q);