Farkle Score API
Farkle dice-scoring maths as an API, computed locally and deterministically — the points a Farkle (Zilch, Ten Thousand) scoring app tallies a roll by. The score endpoint takes up to six dice and returns the value by the common ruleset: a single 1 is 100 and a single 5 is 50; three of a kind scores the face times 100 (three 1s being the exception at 1000); four, five and six of a kind are 1000, 2000 and 3000; a 1-to-6 straight or three pairs is 1500; and two triplets is 2500 — so 1-1-1-5-5-5 scores 2500 as two triplets rather than 1100, a 1-2-3-4-5-6 straight is 1500, and 6-6-6-2-3 is 600 with the 2 and 3 dead. It flags a farkle when nothing scores (you lose the turn’s points) and tells you whether every die counted — a hot dice that lets you roll all six again. Rulesets vary, so it scores the widely-used set and says so. Everything is computed locally and deterministically, so it is instant and private. Ideal for dice-game, party-game and scoring app developers, score-helper and game-night tools, and board-game-companion software. Pure local computation — no key, no third-party service, instant. Scores a roll; it does not roll the dice. Live, nothing stored. 1 compute endpoint.
api.oanor.com/farkle-api