Anvyl

Puddle: from a web prototype to a native iPhone game

Puddle started as a one-file web prototype: drag blocks onto a grid, wall in an empty space, and rain fills it. The puddle washes away every block it touches.

The first job was to move the rules into Swift without changing a single outcome, because the daily board has to give everyone the same pieces.

How we kept the two versions identical

The one-ulp bug

One test failed by the smallest possible amount. JavaScript's Math.log1p(2) and Apple's differ in the last bit. The fix: a small table of the JavaScript values, so the dealer ranks hands exactly as the web build does.

All entries