Daniel Chan
Full stack software engineer in Singapore, currently at QCP.
What's here
The leaderboard
The strongest engineering on the site. Scores are never submitted โ the browser sends the moves it played, and a Cloudflare Function replays them server-side to derive the score itself, so there's no number to tamper with. Verifying a Tic Tac Toe streak originally cost around 9ms of CPU against a roughly 10ms budget; the fix was realising the game only has 183 possible drawn positions, which turns the check from a search into a lookup.
See the leaderboardThe games
2048, Snake and Tic Tac Toe. Each keeps its rules as pure logic in
Play a gamesrc/lib/, with React only in the component โ which is what makes them testable, and what made server-side replay possible at all. 90 assertions cover them, including an exhaustive proof that the Tic Tac Toe AI never loses.Writing
Nothing published yet.
Read the blog