composerinteralia / minesweeper

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The classic puzzle game built for the browser using Laris, my own lightweight web framework

Details:

  • Clicking a tile either explodes it or reveals it and recursively reveals any safe neighbors
  • Right clicking (or alt + click) flags tiles as unsafe
  • Performance enhanced by caching tile's neighbors and neighboring bomb count
  • Optimizes random bomb placement achieved with a monkey-patched array sampling method
  • Keeps grid iteration DRY with Board.prototype.forEachTile()
  • Renders Tile components with classes (for CSS styling) reflecting the tile's state and bomb count
  • Renders Tile components with inline styling for randomized end-of-game shaking and exploding
  • Prevents first-turn loss by moving the bomb to another tile
  • Implements a simple dispatcher for the high score store

Screenshots:

gameplay gameover

About


Languages

Language:JavaScript 63.8%Language:CSS 21.5%Language:HTML 8.2%Language:Ruby 6.4%