<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Aladdin Gu</title>
    <description>The latest articles on DEV Community by Aladdin Gu (@alwaysaladdin).</description>
    <link>https://dev.to/alwaysaladdin</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4099653%2Fc0cf83ac-ce44-46bc-8f5d-840dfe60228f.jpg</url>
      <title>DEV Community: Aladdin Gu</title>
      <link>https://dev.to/alwaysaladdin</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/alwaysaladdin"/>
    <language>en</language>
    <item>
      <title>Building QueensGamers: 1,800 Free Puzzles and an Open-Source TypeScript Engine</title>
      <dc:creator>Aladdin Gu</dc:creator>
      <pubDate>Sat, 29 Aug 2026 02:38:14 +0000</pubDate>
      <link>https://dev.to/alwaysaladdin/building-queensgamers-1800-free-puzzles-and-an-open-source-typescript-engine-2ddj</link>
      <guid>https://dev.to/alwaysaladdin/building-queensgamers-1800-free-puzzles-and-an-open-source-typescript-engine-2ddj</guid>
      <description>&lt;p&gt;A Queens puzzle looks simple at first: place a few queens on a colored grid.&lt;/p&gt;

&lt;p&gt;Then the constraints start interacting.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;That is why I built &lt;a href="https://queensgamers.com" rel="noopener noreferrer"&gt;QueensGamers.com&lt;/a&gt;: a free browser-based place to play colored-region Queens puzzles, from quick daily boards to much larger challenges.&lt;/p&gt;

&lt;h2&gt;
  
  
  How the game works
&lt;/h2&gt;

&lt;p&gt;You need to place queens while following four rules:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Every row must contain exactly one queen.&lt;/li&gt;
&lt;li&gt;Every column must contain exactly one queen.&lt;/li&gt;
&lt;li&gt;Every colored region must contain exactly one queen.&lt;/li&gt;
&lt;li&gt;Queens cannot touch—not even diagonally.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;No chess knowledge is required. The queen is simply the marker used for each confirmed position.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  Daily, unlimited, and larger challenges
&lt;/h2&gt;

&lt;p&gt;QueensGamers currently offers several ways to play.&lt;/p&gt;

&lt;h3&gt;
  
  
  Daily Challenge
&lt;/h3&gt;

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

&lt;h3&gt;
  
  
  Unlimited Play
&lt;/h3&gt;

&lt;p&gt;If one daily challenge is not enough, the full library contains &lt;strong&gt;1,800 puzzles&lt;/strong&gt; across six board sizes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;7×7&lt;/li&gt;
&lt;li&gt;8×8&lt;/li&gt;
&lt;li&gt;9×9&lt;/li&gt;
&lt;li&gt;10×10&lt;/li&gt;
&lt;li&gt;11×11&lt;/li&gt;
&lt;li&gt;12×12&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h3&gt;
  
  
  Daily Archive
&lt;/h3&gt;

&lt;p&gt;Past Daily challenges remain available in the archive, so missing a day does not mean losing the puzzle forever.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;You can try it here:&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://queensgamers.com" rel="noopener noreferrer"&gt;Play Queens Game free online&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Opening up the puzzle engine
&lt;/h2&gt;

&lt;p&gt;I also wanted the underlying puzzle logic to be useful outside the website, so I created an independent open-source project:&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://github.com/alwaysaladdin/queens-game-engine" rel="noopener noreferrer"&gt;Queens Puzzle Engine on GitHub&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It is a browser-first TypeScript engine for generating, validating, and solving colored-region Queens puzzles.&lt;/p&gt;

&lt;p&gt;The current &lt;code&gt;v0.1.0&lt;/code&gt; pre-release supports:&lt;/p&gt;

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

&lt;p&gt;The npm package has not been published yet, but you can clone and test the project now:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/alwaysaladdin/queens-game-engine.git
&lt;span class="nb"&gt;cd &lt;/span&gt;queens-game-engine

pnpm &lt;span class="nb"&gt;install
&lt;/span&gt;pnpm check
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The tricky part: proving uniqueness
&lt;/h2&gt;

&lt;p&gt;Generating a valid-looking board is not enough. A useful puzzle should have exactly one solution.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;That distinction matters:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Finding one solution proves the puzzle is solvable.&lt;/li&gt;
&lt;li&gt;Failing to find a second solution proves it is unique.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Using a seed also makes puzzle generation reproducible within the same engine version—the same board size and seed produce the same puzzle.&lt;/p&gt;

&lt;h2&gt;
  
  
  What comes next
&lt;/h2&gt;

&lt;p&gt;The roadmap currently includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Publishing &lt;code&gt;@queensgamers/engine&lt;/code&gt; to npm&lt;/li&gt;
&lt;li&gt;SVG puzzle rendering&lt;/li&gt;
&lt;li&gt;Performance benchmarks&lt;/li&gt;
&lt;li&gt;A hosted browser playground&lt;/li&gt;
&lt;li&gt;Human-style deduction explanations&lt;/li&gt;
&lt;li&gt;Reusable React board components&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;If you enjoy logic puzzles, try a board at &lt;a href="https://queensgamers.com" rel="noopener noreferrer"&gt;https://queensgamers.com&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you are more interested in how the puzzles are generated and verified, explore the &lt;a href="https://github.com/alwaysaladdin/queens-game-engine" rel="noopener noreferrer"&gt;Queens Puzzle Engine repository&lt;/a&gt;. Issues, puzzle samples, tests, documentation improvements, and algorithm contributions are all welcome.&lt;/p&gt;

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

</description>
      <category>freegame</category>
      <category>puzzlegame</category>
      <category>typescript</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
