Under the hood

No Turns, No Locking Each Other Out: How Co-op Sudoku Stays in Sync

Co-op mode drops the whole room onto one grid instead of giving everyone their own copy. Anyone can tap any open cell and fill it in, at any moment — no turn order, no locking a cell while you think about it. That sounds like it should cause chaos. It doesn’t, because the client is deliberately not trusted with any of the decisions.

Every other real-time feature in this app leans on the client at least a little. Co-op doesn’t: when you fill a cell, your app doesn’t update its own board at all — it sends a fillCell message to the server and waits. The server is the only thing that ever decides what the grid actually looks like. Once it’s applied the change, it broadcasts the entire board state back out to everyone in the room, and every client — including the one that just made the move — repaints from that broadcast. There’s no local mutation to get out of sync with what the server eventually says, because there never was a local version of the truth to begin with.

That single rule is also what makes “no locking” safe. If two people tap the same open cell within the same second, there’s no race condition to worry about client-side, because neither client ever assumed its own tap succeeded — they’re both just waiting on the next broadcast to find out what actually happened.

It’s also deliberately close-mouthed about correctness. The server never sends the solution to anyone. What it sends is a correct/incorrect flag per filled cell, so the board can show you that something’s wrong without ever handing you the answer — the same trust model the rest of multiplayer uses, just applied to a board six people are staring at simultaneously instead of one.

The result plays well for mixed skill levels in particular: a stronger solver and someone newer to sudoku can sit on the same grid, both filling in what they’re sure of, and the shared correctness signal does the rest of the teaching for you. Give co-op a try with a friend, or a whole room.

Coming soon

Grandmaster Sudoku is in development for iOS and Android.