diff options
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) { |