#board-game
2 APIs with this tag
Cribbage Score API
Cribbage hand-scoring maths as an API, computed locally and deterministically — the count a cribbage player, app or league tallies a hand by. The score endpoint takes the four-card hand and the starter (cut) card and returns the full breakdown by the rules: every distinct combination of cards summing to fifteen scores 2, each pair scores 2 (so three of a kind is 6 and four is 12), each run of three or more consecutive cards scores its length — counting the duplicate runs that pairs create — a four-card flush in the hand is 4 (five with the starter is 5, and the crib only scores a five-card flush), and his nobs, a Jack in hand matching the starter’s suit, is 1. It correctly scores the famous best hand, J-5-5-5 with a fifth 5 cut, at the maximum 29. The count endpoint tallies just fifteens, pairs and runs for any one to eight cards — useful for checking part of a hand or the pegging pile. Everything is computed locally and deterministically, so it is instant and private. Ideal for cribbage, card-game, board-game-companion and scoring app developers, score-verification and teaching tools, and game software. Pure local computation — no key, no third-party service, instant. Cards as rank+suit (5H, TD, JS). Live, nothing stored. 2 compute endpoints.
api.oanor.com/cribbage-api
Yahtzee Score API
Yahtzee scoring maths as an API, computed locally and deterministically — the category scores and totals a dice-game scoring app runs on. (It scores a given roll; it does not roll the dice.) The score endpoint takes five dice and returns the value of every one of the thirteen boxes at once: the upper boxes (ones through sixes) score the sum of that number, three- and four-of-a-kind and chance score all five dice, a full house is 25, a small straight (four in a row) 30, a large straight (five in a row) 40 and a Yahtzee (five of a kind) 50 — so 3-3-3-5-6 is worth 20 in three-of-a-kind, 4-4-4-5-5 is a 25-point full house, and it flags the highest-scoring box for you. The total endpoint adds up a finished card: the 35-point upper-section bonus when the upper boxes reach 63 (and how many points you still need for it), plus 100 for each extra Yahtzee, to give the grand total. Everything is computed locally and deterministically, so it is instant and private. Ideal for dice-game, board-game-companion, family-game and scorekeeping app developers, score-sheet and tournament tools, and game software. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 2 compute endpoints. For random rolls use a dice API.
api.oanor.com/yahtzee-api