How I Built Minesweeper in 10 Minutes with Claude in My Terminal
I rediscovered Minesweeper recently and got hooked again. But finding a good way to play it in 2026? That was the real puzzle.
The mobile apps were riddled with ads—play one game, watch a 30-second video. The free Google version worked but felt clunky and frustrating to use. I started wondering: should I just pay for an app? Or...
I've been using Claude Code in my terminal for other projects. What if I just asked it to make me a game?
Not a tutorial. Not "help me understand how to build a game." Just: "Create a website for me with a game of minesweeper."
That's exactly what I typed. Here's what happened.
The Process
1 The Initial Request ~30 seconds
I already had Claude Code set up and running in my terminal. I simply typed my request and hit enter. Claude immediately got to work, writing a complete HTML file with embedded CSS and JavaScript.
Within about 30 seconds, I had a working minesweeper game with:
- Three difficulty levels (Easy, Medium, Hard)
- Mine counter and timer
- Click to reveal, right-click to flag
- Win/lose detection
- Clean, modern dark UI
2 The Review ~2 minutes
I opened the file in my browser and played a few rounds. It worked! But I wanted Claude's opinion, so I asked:
"Play the easy level and rate it from a user perspective."
Claude analyzed the game and came back with a UX review, identifying several improvements:
- First-click safety: Classic minesweeper never lets you hit a mine on your first click
- Restart button: No way to restart without changing difficulty
- Mobile support: Right-click flagging doesn't work on phones
- Chord clicking: Double-click a number to reveal adjacent cells when flags are placed
3 The Improvements ~3 minutes
I said "okay, make those improvements" and Claude updated the code. The changes included:
- Mines now generate after your first click, guaranteeing safety
- Added a Restart button that keeps your current difficulty
- Added a Flag Mode toggle for mobile users
- Added long-press to flag on touch devices
- Implemented double-click chord functionality
- Visual polish: better emoji icons, animations, correct-flag highlighting
4 Done.
That was it. From idea to polished, mobile-friendly game in under 10 minutes. The final result is a single HTML file—no build tools, no dependencies, no npm install. Just one file I can drop on any web server.
But Then I Tried It on My Phone
The desktop version was done in 10 minutes. But when I opened it on my iPhone, the cracks showed. Double-tap to chord didn't work reliably. Long-press to flag felt inconsistent. The cells were too small. It was playable, but not enjoyable.
So I spent a morning with Claude fine-tuning the mobile experience. We went back and forth:
- "Double-tapping a number doesn't work on my iPhone" — Claude suggested a Chord mode button, then we simplified to just tapping revealed numbers
- "Sometimes I long-press but it still reveals" — we tweaked the timing from 500ms to 350ms to 200ms until it felt right
- "The cells are too small on hard mode" — Claude added responsive sizing and a warning that hard mode works best on tablet
- "We need a pause button" — done in one request, complete with an overlay that hides the board
Each fix took seconds to implement. The iteration was the work—figuring out what felt wrong and describing it.
What I Learned
The thing that surprised me most wasn't that AI could write the code—it was the iterative refinement. I didn't need to explain game logic or debug edge cases. I just said "this feels wrong" and Claude knew how to fix it.
Ten minutes got me a working game. A morning of back-and-forth got me a game I actually want to play on my phone. No ads. No subscriptions. Just a single HTML file I own forever.
The conversation felt less like programming and more like working with a senior developer who happens to type at 1000 WPM.
Try It Yourself
If you have Claude Code set up, try asking for a game. You might be surprised. And if you want to play the result of my experiment:
The minesweeper game Claude built for me
Play Minesweeper →This is the first game in what I'm calling PuzzleLab—a sandbox for AI-generated puzzle games. More coming soon.