Cornhole Scoring API
Cornhole (bag-toss) scoring as an API, computed locally and deterministically and exactly — the points behind a game of bags, from cancellation scoring to the win and the stats. The round endpoint scores a single round with cancellation rules: a bag on the board is 1 point, in the hole is 3, and only the higher player scores, and only the difference — so a player who lands 1 on the board and 2 in the hole (7) against an opponent's 2 on and 1 in (5) nets 2 points, and a tied round scores nothing. The game endpoint applies a round's points to a running total with the win rule — official ACL play is first to 21 or more at the end of an inning with no bust, while backyard 'exact 21' rules bust a player who goes over back to 15 or 11 — and reports the new score, whether the game is won, and the points still needed. The ppr endpoint gives the headline cornhole stats: points per round (PPR) = total points ÷ rounds, plus the in-the-hole percentage from bags in the hole over bags thrown — 84 points across 20 rounds is a 4.2 PPR, and 30 of 80 bags in the hole is 37.5 %. Everything is computed locally and deterministically, so it is instant and exact. Ideal for cornhole and lawn-game apps, league and tournament scorekeepers, bracket and stats tools, and backyard game-night sites. Pure local computation — no key, no third-party service, instant. Exact integer maths. Live, nothing stored. 3 compute endpoints. Standard ACL rules; house rules vary.
api.oanor.com/cornhole-api