diff options
author | elioat <elioat@tilde.institute> | 2024-12-28 09:56:22 -0500 |
---|---|---|
committer | elioat <elioat@tilde.institute> | 2024-12-28 09:56:22 -0500 |
commit | 0e21da444131ebc4b30230de829ea0d1f2410f0b (patch) | |
tree | 1d21c412278691ba3196f3baae8fde16859b855e /html/rogue/js/game.js | |
parent | eed3c76d745f37ade56d0cc4ed8486913cd8e1f7 (diff) | |
download | tour-0e21da444131ebc4b30230de829ea0d1f2410f0b.tar.gz |
*
Diffstat (limited to 'html/rogue/js/game.js')
-rw-r--r-- | html/rogue/js/game.js | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/html/rogue/js/game.js b/html/rogue/js/game.js index 53700c9..f84d670 100644 --- a/html/rogue/js/game.js +++ b/html/rogue/js/game.js @@ -38,8 +38,8 @@ function drawHex(ctx, x, y, hex) { return; } - // Only draw hex if it's been revealed or is currently visible - if (FogOfWar.isRevealed(hex) || FogOfWar.isVisible(hex)) { + // Only draw hex if it's been revealed + if (FogOfWar.isRevealed(hex)) { ctx.beginPath(); for (let i = 0; i < 6; i++) { const angle = 2 * Math.PI / 6 * i; @@ -53,18 +53,11 @@ function drawHex(ctx, x, y, hex) { } ctx.closePath(); - // Fill hex with appropriate color - if (HexGrid.isPassable(hex)) { - ctx.fillStyle = Config.colors.HEX_FILL; - } else { - ctx.fillStyle = Config.colors.BACKGROUND; - } + ctx.fillStyle = Config.colors.HEX_FILL; ctx.fill(); // Draw border with appropriate color based on visibility - if (!FogOfWar.isRevealed(hex)) { - ctx.strokeStyle = 'rgba(0, 0, 0, 1)'; // Match full shadow color - } else if (!FogOfWar.isVisible(hex)) { + if (!FogOfWar.isVisible(hex)) { ctx.strokeStyle = 'rgba(0, 0, 0, 0.25)'; } else { ctx.strokeStyle = HexGrid.COLOR; // Normal grid color |