🧠 MIND BLOWN BY CLAUDE CODE - it wrote a Minesweeper game for me for only $0.24 !
Claude Code is a coding agent from Anthropic. It is not an IDE like Cursor, but a command line program (CLI) that you start and let run on your code. You give prompt inputs and Claude Code generates the code, finds out how to build and run the tests. On build errors, Claude Code will fix the problems and try to build again, for as long as it takes to make the code compile. It runs the tests, parses the output and fixes tests and code until the tests are all working. All of this might take some minutes while Claude Code is generating code, compiling it, fixing it, again and again until it is done. It feels like a machine you can watch building something. Or if you’re sarcastic, it feels like over night batch programming of the mainframe era. You wrote some code, it compiled and ran over night, and with the morning coffee you got the results.
Why would you create Minesweeper?
In the beginning I wanted to create one of the games of my childhood with Claude Code - from the 8bit era. But because I wanted to learn something, not play a game or impress people with a post on Substack, I changed my mind to small steps. First something that with a high probablity Claude Code could accomplish. In the next installments of this series we will venture into different directions to gain more understanding of the capabilities of coding agents. Minesweeper was an easy target, there are tens of thousands of repositories on Github, so Claude should have a very deep understanding of the game and what it is. Small steps for creating stable foundations. More challenging games one-shotting in the future.
How did I use Claude Code to create Minesweeper?
I’ve used Claude to generate a requirements.txt file from the Minesweeper description on Wikipedia
Then added my technical requirements of HTML, JavaScript and Canvas usage
At last I told Claude Code to "implement minesweeper game described in requirements.txt" (ha, grammar!)
Claude created the requirements for Minesweeper with my input, which looked like this:
From the requirements I let Claude Code lose with “implement minesweeper game described in requirements.txt”.
After only 2 minutes, 54 seconds (!) it was done without one hickup. The game just works: Cost: $0.24
Claude Code generated CSS, JavaScript and HTML for the game, roughly 1k LOC. The “Estimated Cost to Develop” is funny though, $21k - which is roughly 100000x off, remember it did cost $0.24.
All of this is excellent.
What are the downsides? With current vibe coding, problems arise in the collaboration of several developers on one feature or different features on the same code base (more modules, less layers! More on that in a future article). Different agents make big changes to the source code, and we get difficulties when merging. Git drove people to small commits for hassle-free merging, vibe coding gets us back to the 90s. Everything is fine with green field development or you vibe coding alone on a side project. Five developers in a team, the results are not yet in on how well that goes (but perhaps with AI we no longer need teams). Beside the code conflicts and different agents having different styles rewriting and rewriting the same code, developers no long know what is going on. Today with code reviews and daily standups the team has a rough understanding of where the code is right now, with vibe coding and un-reviewable changes, the team has no understanding on what is going on - and cooperation is impossible.
I propose a different model to developing with AI: One-shotting. One-shotting code from requirements. You cooperate on requirements, e.g. a requirements.txt and have other requirement artifacts like fake screenshots (or screenshots from the last iteration), database schemas etc. and then let the AI one-shot the microservice or frontend. This is currently limited by cost and AI performance (welcome back to the 1970 of overnight-batch-programming) but makes cooperation possible on the higher level of requirements instead of source code. We will get IDEs to sort requirements into different folders, e.g. have a checkout folder with the requirements and the screenshots and a login folder etc. Developers (product engineers?) work on these in the IDE instead of source code. Have several technology.txt to describe how to write that part, e.g. with Javascript and HTML. Let me repeat:
This is the future, AI as a compiler. A compiler that compiles requirements to source code instead of source code to binary.
Google Gemini 2.5 Pro
Google Gemini 2.5 Pro has arrived and it is touted as the best thing since sliced bread. It currently has no agent tool like Claude Code, you need to do prompting. It can run the game, but you need to save the artifacts to have them locally.
I had to give it a shot at Minesweeper. I’ve asked Google Gemini 2.5 Pro for the same thing, just with a shorter prompt of “Create a Javascript Minesweeper game“ and no requirements.txt. The result worked fine, though it wasn't as polished. The game was much harder, because Gemini in all games I've played, created several clusters of mines (see the game below as an example of the code running and of mines clustering).
Future
One can easily imagine, "Computer? I want to play Minesweeper". The code is generated, I play Minesweeper, I stop playing, the code is removed as it was never there. When I want to play again, the code is regenerated. We get real Games-On-Demand.