How I Built Quads, a Mobile Board Game, With Claude — From a 2-Hour Hackathon to the App Store
Quads is a mobile board game — a clean take on the classic abstract game Quarto — that started as a 2-hour hackathon with a friend in Colombia and shipped to the app stores. This is the fully-open version of how I build with Claude: parallel agent worktrees, a real (non-LLM) game AI, offline-first design, and the specific gotchas that cost me hours.
Every Wednesday. 28,400+ operators. Zero fluff.
✓ Check your inbox — click the confirmation link to complete sign-up.
✓ You're subscribed!
✓ You're already on the list.
Table of contents
Open Table of contents
- It started as a 2-hour hackathon in Colombia
- What Quads actually is
- The game logic: a whole ruleset that falls out of bit math
- The AI opponent is not an LLM (and that’s the right call)
- How I actually run Claude: parallel agents in worktrees
- The gotcha that cost me an hour (so it won’t cost you one)
- The offline-first tricks I’m proud of
- From hackathon to store listing
- FAQ
It started as a 2-hour hackathon in Colombia
The origin is almost embarrassingly casual. I was on a trip to Colombia, and a friend and I gave ourselves a 2-hour hackathon: pick something small, build it with AI, see how far we get. We landed on Quarto — a beautiful little abstract strategy game that’s easy to learn and surprisingly deep. Two hours later we had a playable prototype, and the idea was too good to leave on a laptop.
What started as a timeboxed dare turned into a real, shipped mobile app on iOS and Android. That arc — joke prototype to store listing — is the whole reason I think this project is worth writing about. The distance between “fun idea” and “thing strangers can download” has collapsed, and Quads is a clean case study in how.
First, a quick detour on the name. The game is a reimplementation of Quarto, which is a trademarked game owned by Gigamic. So the very first non-code decision was to not call it Quarto anywhere a customer would see. It went from Quarto (the mechanic) to a couple of interim names to Quads — a name that’s mine to use. If you’re reimplementing a classic, sort the trademark question out before you fall in love with a name.
What Quads actually is
For the uninitiated: Quads is played on a 4×4 board with 16 unique pieces. Every piece has four binary attributes — tall or short, dark or light, square or round, solid or hollow — and the 16 pieces cover every possible combination exactly once. You win by completing a line of four pieces that share any one attribute.
The twist that makes it brilliant: you don’t choose the piece you place. Your opponent hands it to you. Then you hand them theirs. So every turn is a double bind — you’re trying to place the piece you were given without setting up a win, while choosing a piece to give that doesn’t hand your opponent the game. It’s elegant and genuinely hard.
The app ships four ways to play, all fully offline: versus the computer across five difficulty tiers, pass-and-play on one device, a daily puzzle, and an asynchronous “challenge a friend” mode. No account, no server, no login. That offline-first decision drove a lot of the engineering, and it’s a big part of why a solo build was tractable.
The game logic: a whole ruleset that falls out of bit math
This is my favorite part, because it’s the kind of thing that’s satisfying whether or not AI wrote it.
Each of the 16 pieces is just an integer from 0 to 15. Each of the four bits is one attribute. That’s it — the entire piece set is the numbers 0–15, because four bits give you exactly 16 combinations.
Win detection then becomes almost trivial. For any line of four pieces, you keep two running accumulators: the bits that are 1 in every piece, and the bits that are 0 in every piece. If either accumulator is non-zero after all four, the pieces agree on at least one attribute — that’s a win. The whole ruleset collapses into a couple of bitwise ANDs.
Because the logic is pure functions over integers — no framework, no UI, no state — it’s directly unit-testable, and it’s trivial to extend. Quads even ships a house-rule variant where the nine 2×2 squares also count as winning shapes, which is a two-line addition on top of the same bit trick. When you and an AI partner keep the core logic this clean, adding a feature is a joy instead of a risk.
The AI opponent is not an LLM (and that’s the right call)
Here’s a teaching moment I care about: not every “AI” should be a large language model.
The Quads opponent is pure classical game AI, and it should be. On every turn it makes two decisions — where to place the piece it was handed, and which piece to hand back — and difficulty scales how hard it thinks:
- Rookie plays essentially randomly and will hand you the win.
- The middle tiers add heuristics: take an immediate win if one exists, and avoid gifting a piece the opponent can win with, preferring the piece that arms the fewest future threats.
- Master and Grandmaster run a bounded negamax search — real game-tree search — but with a hard node budget so a move can never hang the phone’s main thread. Early in the game, where perfect search is intractable, it falls back to fast heuristics; late in the game, where the tree is small enough, it searches for real.
Two things worth stealing from this. First, a language model would be worse here — slower, more expensive, non-deterministic, and beatable — than fifty lines of negamax. Match the tool to the problem. Second, the node budget is the real engineering: on a mobile device, “correct but occasionally hangs for four seconds” is a failed feature. Bounding the search so a move is always fast, even if occasionally suboptimal, is the difference between a toy and a product. Knowing when to reach for an LLM is the same judgment I apply to every automation — it’s the core of how I decide whether an AI build is worth it.
How I actually run Claude: parallel agents in worktrees
Now the part I keep private on my bigger products but can show you fully here.
I don’t build with one Claude session at a time. I run several in parallel, each in its own git worktree on its own branch. One agent adds internationalization, another builds the daily-puzzle system, another does colorblind mode, another wires up sound — each isolated in its own working copy so they can’t clobber each other, and each gets merged back when it’s green. The git history of Quads is a wall of Merge branch 'worktree-agent-…' commits, which is exactly what that workflow looks like from the outside.
The reason worktrees matter is simple: parallel agents editing the same working directory step on each other instantly. Give each one an isolated checkout and you can genuinely have four features under construction at once, then merge them like any other branches. It’s the single highest-leverage change to how I work — I went from one conversation, one feature, to a small fleet.
If you want the discipline behind the prompts those agents run on, it’s the same one I describe in how to write AI agent system prompts that don’t fail in production: the leverage is in clear, current specs, not clever phrasing.
The gotcha that cost me an hour (so it won’t cost you one)
Every project teaches you one dumb, expensive lesson. On Quads it was this: the preview tool doesn’t always show the branch you think it’s showing.
When you run multiple agents in multiple worktrees and preview their work, the preview can launch from a different directory than the one your current session is in — so you screenshot the app, see none of your changes, and start debugging “missing” UI that was never missing. The feature was fine; the preview was pointed at the wrong checkout. I lost real time to this before I figured out what was happening, and I wrote it down in the project’s own notes so future-me (and any agent I hand the repo to) checks the preview target before debugging phantom bugs.
The related trap: the config file that defines those previews is shared across parallel sessions, so two agents editing it at once can silently overwrite each other’s entries. If you’re going to run a fleet, treat shared config as a contended resource — it will bite you exactly once, and then never again if you write the lesson down.
That habit — capturing every hard-won gotcha in a durable file the next session will read — is the quiet backbone of building with AI at any scale. Context evaporates between sessions; written lessons don’t.
The offline-first tricks I’m proud of
Because Quads has no backend, a few problems needed clever, serverless answers:
- The daily puzzle is chosen deterministically from the local day of the year, so every player worldwide gets the same puzzle with zero server coordination. (Bonus lesson: I shipped, then immediately fixed, a daylight-saving off-by-one in that date math. Dates are always harder than they look.)
- “Challenge a friend” encodes a puzzle into a short text code — something like
QC1-01-03-3— guarded by a checksum so a typo can’t produce a valid-but-wrong challenge. Your friend types it into their own copy of the app and plays the exact position, entirely offline. No accounts, no matchmaking, no server. - Rich link previews are the one place I did use a tiny bit of server code. When you share a challenge link, a single Cloudflare Pages Function renders per-code Open Graph tags so the link unfurls nicely in iMessage or WhatsApp. Social crawlers don’t run JavaScript, so a client-rendered preview would look identical for every link — one small function fixes that without needing a real backend.
None of these are hard once you see them, but each one is a place where the lazy answer is “spin up a server and a database,” and the better answer is “do the clever offline thing.” Avoiding a backend entirely is why one person could ship and maintain this.
From hackathon to store listing
The last stretch — the part nobody tells you about a “2-hour project” — is everything between “it works on my phone” and “strangers can download it.” Internationalization across eight languages in one sweep. Store copy that never uses the trademarked name. App-store build tooling, versioning, and the platform-specific permission cleanups that keep a store review from bouncing you. This is unglamorous, and it’s where a lot of side projects quietly die.
Doing it with Claude didn’t make the checklist shorter, but it made each item cheap enough that I actually finished. That’s the real story of Quads: not that AI wrote a board game — plenty of people can prototype one — but that it lowered the cost of the last mile enough that a hackathon joke became a shipped product.
If you’ve got a small idea you’ve been sitting on, that’s my whole pitch. Start the 2-hour version. You’ll be surprised how close the finish line has moved. And if you want to see how far up the scale this same working style goes, I took it all the way to a full multi-tenant SaaS — how I built Courtlines, a club-management platform, with Claude.
Play Quads at playquads.com.
FAQ
What is Quads?
Quads is a mobile board game for iOS and Android — a clean reimplementation of the classic abstract strategy game Quarto. You play on a 4×4 board with 16 unique pieces, and the twist is that your opponent chooses the piece you have to place. It’s free to play with modes for solo, pass-and-play, a daily puzzle, and asynchronous challenges. Find it at playquads.com.
Did Claude write the whole game?
Claude wrote the large majority of the code, working from the design and decisions I own. I ran several Claude sessions in parallel, each in its own git worktree, building different features that I merged together. The game logic, the AI opponent, internationalization, sounds, and the puzzle system were largely built this way and reviewed by me.
Is the in-game AI opponent powered by an LLM?
No — and deliberately so. The opponent uses classical game AI: heuristics at lower difficulties and a bounded negamax search at the top tiers, with a hard node budget so a move never hangs the device. A language model would be slower, costlier, and weaker for this job. Choosing the right kind of AI for the problem matters more than always reaching for the biggest model.
How long did Quads take to build?
The first playable prototype came out of a 2-hour hackathon with a friend on a trip to Colombia. Turning that prototype into a polished, shippable app on both app stores — with internationalization, a real AI opponent, offline challenges, and store compliance — took considerably longer, but each individual step was cheap enough with AI that the project actually reached the finish line.
What’s the biggest lesson from building Quads with Claude?
Two things. First, run agents in isolated git worktrees so you can build several features in parallel without them clobbering each other. Second, write down every gotcha in a durable file the next session will read — context evaporates between sessions, but written lessons compound. For the bigger picture of this working style, see how I built Courtlines with Claude.
Every Wednesday. 28,400+ operators. Zero fluff.
✓ Check your inbox — click the confirmation link to complete sign-up.
✓ You're subscribed!
✓ You're already on the list.
Related posts
How I Built Courtlines: A Club-Management SaaS, Engineered With Claude
The story behind Courtlines, the operating system for racket-sport clubs and studios — why I built it, what it does, and how using Claude as my primary engineering partner let one operator ship a full multi-tenant SaaS.
AI AgentsHow to Write AI Agent System Prompts That Don't Fail in Production
Updated for 2026. A practitioner's guide to writing AI agent system prompts that hold up in production — five layers, real examples from 30+ agents, and the maintenance habits that prevent silent drift.
AI AgentsAI Agent ROI: How I Decide Whether an Automation Is Worth Building
Updated for 2026. The framework I use to decide whether an AI automation is actually worth building — quantified manual cost, build cost, run cost, maintenance tax, and the payback formula I apply before writing a single line of agent code.
Get the AI playbook in your inbox
Every Wednesday. 28,400+ operators. Zero fluff.
Check your inbox.
We sent you a confirmation email — click the link inside to complete your subscription. Check spam if you don't see it within a minute.
You're subscribed.
Welcome — the next edition lands in your inbox soon.
You're already on the list — look for it every Wednesday.