Skip to content

Building a Canasta App with Our House Rules, Day 3: Phase 1 Closes, and the Disk Fills Up

Day 2 ended late, with the last pull requests of the evening shift merged and the hand sorted from a dropdown on every platform. Day 3 was a Friday, and a quieter one. Only one pull request reached main, but it was the one that closed phase 1’s checkpoints. The rest of the day went on the disk, again, and on research I had been putting off.

A whole game, with nobody playing

The last phase 1 checkpoint (#7) had a simple test written into it from the start: a full solo game has to play on an iPhone simulator and on an Android emulator. Not the rules engine on its own, which had passed thousands of games already, but the real app, through its real screens.

So each app got one UI test that plays a whole game the way I would. On the new-game screen it picks Family rules, four players and Normal computer players, then taps Deal. From there it plays my seat through the buttons at the bottom of the table: draw, take a card, discard it, say yes when my partner asks to go out, deal the next hand. When the app refuses a discard, the test puts the card back and tries the next one. It stops at the game-over screen and checks the result.

The apps have no way to choose a seed from the screen, so a setting that only exists in test builds deals from a fixed seed and skips the short pause before each computer move. With the same seed, both apps play the same game: four hands, 43 of my turns, and Players 2 and 4 win, 5,370 to 125. The same final score on iPhone and Android, from the real screens, is the parity test from Day 1 one level up.

The iPhone test takes about eight minutes. The Android one plays the game in about one. Neither runs in bin/test; the development notes say how to run them.

Android had one surprise. The test framework that Compose brings with it calls a system function that the emulator’s version of Android no longer has, so every test failed at its first wait. The fix was to pin a newer, pre-release version of it. It’s the kind of problem you only find by running the thing.

That pull request (#103) closed #7. Every phase 1 checkpoint is now done. One gate is left, and it’s mine: a real hand from a family game, scored on paper, that the app has to score the same way (#49).

The disk, again

On Day 2 I moved the worktrees, the copies of the repo each agent works in, to an external SSD. I thought that had solved the disk. It hadn’t. On Friday the Mac’s internal disk fell to 143 MB free.

The worktrees were no longer the problem. What filled the disk was everything around them: the Android emulator, the iPhone simulators, the Gradle, npm and Xcode caches, and a macOS update waiting to install. The new UI tests needed the emulator and the simulators, so none of that could just be deleted.

The fix was to move the big shared caches, Gradle’s, npm’s and the emulator’s, to the SSD as well, and leave a link at each usual path that points to the new place. Nothing else had to change. Every tool still looks in the same folder and finds its files on the SSD.

One step needed me. Claude Code can’t widen its own permissions, so it couldn’t give itself access to the SSD. I had to add it to the allowed folders myself. I think that’s the right design: an agent shouldn’t be able to decide on its own where it may write.

Research

With phase 1’s code done, the rest of the day went on what comes after: how people would find the game, who already does this well, and what I’d need to publish it.

The App Store. About eight Canasta apps compete for the same searches. Most of them are paid for with ads or coins. None of them markets family play, house rules, or accessibility for older players. Those three things are why I started this, and none of the others lead with them.

Small studios worth copying. Three stood out:

  • World of Card Games, made by one person, with pages that explain the rules of each game.
  • Trickster Cards, on the web and in an app, built around playing with friends.
  • NeuralPlay, whose pitch is “Your rules”.

None of them has an accessibility statement. That gave me a small, concrete way to be different.

Accounts and domains. We went through what I already have, from my email and the domain registrars. I have a personal Apple Developer account, so publishing to the App Store doesn’t have to wait for a new one.

Where it stands

After three days, the rules, computer players, saved games and online tables work on iPhone, Android and the web, and both apps can play a full game unattended. Phase 1’s checkpoints are closed. What’s left before my family can play is the same list as yesterday, all mine: hosting and a web address, the developer accounts, the sign-in keys and a real family hand.

What I learned on day 3

A test that plays the whole game through the real screens is slow, and worth it. The rules had been right for two days; this test checks that the apps let you reach them.

Moving one heavy thing off the disk only shows you the next one. The disk is a shared resource for every agent, and the parallel work fills it faster than I notice.

Some limits should stay with me. The agent couldn’t change its own permissions, and I was glad it couldn’t.

Research is easier to do after the code works. Knowing what the app can already do made it obvious what to look for in the others: family play, house rules and accessibility, the three things none of them lead with.