← All projects

Bombs & Points

A dependency-free logic-and-luck tile-flipping puzzle in vanilla JavaScript, with generated boards, row and column clues, and progress saved in the browser.

  • JavaScript
  • Game Design
  • Algorithms
  • CSS

A small puzzle game built from scratch in vanilla JavaScript — no frameworks, no build step, no dependencies. You flip tiles on a 5×5 grid, read the row and column clues, multiply your points, and try not to hit a bomb. You can play it on this site using the Live site button above.

It is based on the Voltorb Flip minigame from Pokémon HeartGold and SoulSilver. This is an independent, non-commercial recreation of the idea with its own name, art and code. It isn’t affiliated with or endorsed by Nintendo, Game Freak or The Pokémon Company.

Aim

To build a complete, replayable game around a single risk-versus-reward decision: keep flipping for a bigger multiplier, or cash out and bank what you have. The game logic had to be independent of the interface so it could be reasoned about, and tested, on its own.

How it works

Each tile hides a 1, a 2, a 3, or a bomb.

  • The first safe tile you flip sets the round score and every later flip multiplies it, so 1s are safe but add nothing.
  • Each row and column shows a clue: the sum of its tiles and its bomb count. Combining the two lets you deduce where bombs must be.
  • Flip every 2 and 3 to clear the board, bank the points and go up a level (maximum 8). Hit a bomb and you lose the round’s points and drop a level.

Board generation follows a difficulty curve: each level adds a bomb and raises the number of multiplier tiles, with a growing share of them worth ×3. The tiles are shuffled with a Fisher–Yates shuffle that takes an injectable random number generator, which keeps boards reproducible for testing.

Engineering notes

  • Pure logic, separate UI. logic.js holds board generation, clue calculation and scoring as plain functions with no DOM access. It loads in the browser and in Node, so it can be unit tested without a browser.
  • Persistence. Level, banked points and win/loss statistics are saved to localStorage under a versioned key, with a guard for private-browsing modes where storage is unavailable.
  • Input. Mouse, keyboard (Enter to flip, M for mark mode, N for the next round) and a right-click shortcut for bomb marks.

Result

A finished, playable game that runs anywhere a browser does, with no setup. The version on this site is served as plain static files, exactly as they appear in the repository.