DEV Community

Cover image for Building QueensGamers: 1,800 Free Puzzles and an Open-Source TypeScript Engine
Aladdin Gu
Aladdin Gu

Posted on

Building QueensGamers: 1,800 Free Puzzles and an Open-Source TypeScript Engine

A Queens puzzle looks simple at first: place a few queens on a colored grid.

Then the constraints start interacting.

A queen placed to satisfy one region may block an entire row, eliminate a column, or make two other queens touch. What begins as a small placement game quickly becomes a satisfying constraint-solving challenge.

That is why I built QueensGamers.com: a free browser-based place to play colored-region Queens puzzles, from quick daily boards to much larger challenges.

How the game works

You need to place queens while following four rules:

  1. Every row must contain exactly one queen.
  2. Every column must contain exactly one queen.
  3. Every colored region must contain exactly one queen.
  4. Queens cannot touch—not even diagonally.

No chess knowledge is required. The queen is simply the marker used for each confirmed position.

The interesting part is the interaction between the constraints. A single placement can eliminate several cells and reveal the next forced move. Good solving is less about guessing and more about repeatedly finding rows, columns, and regions with only one legal position left.

Daily, unlimited, and larger challenges

QueensGamers currently offers several ways to play.

Daily Challenge

The Daily mode provides three shared puzzles each day. Complete all three to extend your streak, then return after the daily UTC reset.

Unlimited Play

If one daily challenge is not enough, the full library contains 1,800 puzzles across six board sizes:

  • 7×7
  • 8×8
  • 9×9
  • 10×10
  • 11×11
  • 12×12

Each size contains 300 numbered boards. Smaller grids are useful for learning recurring patterns, while 11×11 and 12×12 puzzles require longer chains of deduction and more careful board management.

Daily Archive

Past Daily challenges remain available in the archive, so missing a day does not mean losing the puzzle forever.

The game runs directly in the browser with no download or required account. It includes X marks for eliminating cells, undo, hints, conflict feedback, local progress, and optional completion timing.

You can try it here:

👉 Play Queens Game free online

Opening up the puzzle engine

I also wanted the underlying puzzle logic to be useful outside the website, so I created an independent open-source project:

👉 Queens Puzzle Engine on GitHub

It is a browser-first TypeScript engine for generating, validating, and solving colored-region Queens puzzles.

The current v0.1.0 pre-release supports:

  • Deterministic puzzle generation from a seed
  • Region and placement validation
  • Backtracking-based puzzle solving
  • Unique-solution verification
  • Board sizes from 7×7 through 12×12
  • Browser and Node.js environments
  • A versioned JSON puzzle format
  • A command-line interface
  • Zero runtime dependencies

The npm package has not been published yet, but you can clone and test the project now:

git clone https://github.com/alwaysaladdin/queens-game-engine.git
cd queens-game-engine

pnpm install
pnpm check
Enter fullscreen mode Exit fullscreen mode

The tricky part: proving uniqueness

Generating a valid-looking board is not enough. A useful puzzle should have exactly one solution.

The engine places queens row by row and prunes candidates whenever they conflict by column, colored region, or adjacent diagonal. During uniqueness verification, it searches for at most two solutions.

That distinction matters:

  • Finding one solution proves the puzzle is solvable.
  • Failing to find a second solution proves it is unique.

The generator creates a deterministic candidate solution, grows connected colored regions around it, and keeps the result only after the solver confirms uniqueness.

Using a seed also makes puzzle generation reproducible within the same engine version—the same board size and seed produce the same puzzle.

What comes next

The roadmap currently includes:

  • Publishing @queensgamers/engine to npm
  • SVG puzzle rendering
  • Performance benchmarks
  • A hosted browser playground
  • Human-style deduction explanations
  • Reusable React board components

The last two are roadmap items rather than current capabilities, and I would especially appreciate feedback from developers interested in constraint solving, puzzle generation, or explainable solving techniques.

If you enjoy logic puzzles, try a board at https://queensgamers.com.

If you are more interested in how the puzzles are generated and verified, explore the Queens Puzzle Engine repository. Issues, puzzle samples, tests, documentation improvements, and algorithm contributions are all welcome.

Which part would you be most interested in seeing next: the npm package, an interactive solver visualizer, or human-readable deduction steps?

Top comments (0)