diff options
author | elioat <elioat@tilde.institute> | 2024-12-28 10:05:27 -0500 |
---|---|---|
committer | elioat <elioat@tilde.institute> | 2024-12-28 10:05:27 -0500 |
commit | 17f514449e90f321b967ef770d16032577749e36 (patch) | |
tree | cce4d71bd23b594d9c2a8af1cefda4a6b131b0b3 /html/rogue/js/game.js | |
parent | b1e55b1d524fba2e13e5b0f2c349546b43fe8341 (diff) | |
download | tour-17f514449e90f321b967ef770d16032577749e36.tar.gz |
*
Diffstat (limited to 'html/rogue/js/game.js')
-rw-r--r-- | html/rogue/js/game.js | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/html/rogue/js/game.js b/html/rogue/js/game.js index 973c33d..f26e59b 100644 --- a/html/rogue/js/game.js +++ b/html/rogue/js/game.js @@ -41,21 +41,18 @@ function drawHex(ctx, x, y, hex) { return; } - // Draw the hex + // Draw the hex fill HexGrid.drawHexPath(ctx, screen.x, screen.y); - - // Fill hex ctx.fillStyle = Config.colors.HEX_FILL; ctx.fill(); - // Draw border with appropriate color based on visibility - if (!FogOfWar.isVisible(hex)) { - ctx.strokeStyle = Config.colors.FOG.GRID_DIM; - } else { + // Only draw grid lines for currently visible hexes + // (fog of war will handle the grid lines for revealed but not visible hexes) + if (FogOfWar.isVisible(hex)) { ctx.strokeStyle = Config.colors.GRID; + ctx.lineWidth = 1; + ctx.stroke(); } - ctx.lineWidth = 1; - ctx.stroke(); } function gameLoop(currentTime) { |