F033 — Rounding Algorithms
Business Rule
A Rounding Algorithm converts the precise computed payout odds (oddsActual) into a player-friendly rounded value (oddsRounded). Rounding is optional — enabled or disabled by the operator at installation.
Example:
RTP impact: Rounding down (the typical direction for player-friendly presentation) reduces actual RTP below target. This is expected and operator-accepted. Rounding mode selection is part of how the operator balances presentation quality against precise RTP targeting.
Source: Game Concept Document
“In Texas Hedge’Em context a ‘Rounding Algorithm’ is the term given to rounding the payout-odds presented to a player to an integer or whole-number-fraction. For example, instead of presenting odds of 3.71:1 the player would be presented odds of 3:1. Rounding Algorithms are optional and enabled or disabled at installation.”
“The target RTP is set by the operator at installation time but the actual RTP can be influenced by other configuration parameters such as ‘Rounding Algorithms’.”
Evidence in Coredata
The coredata (ported from JS game records) shows bothoddsActual and oddsRounded per hand per stage:
Rounding Modes (to be confirmed)
The exact algorithm(s) used in the JS reference implementation require server-side code audit.
TypeScript Implementation
Current status:oddsRounded is consumed directly from pre-computed coredata. No rounding is performed client-side. The oddsRounded field already contains the rounded value.
Display in GameScene.ts (HEDGE-86 — suppress trailing .0):
Acceptance Criteria
Version Parity
Related Features
- F006 — Odds Calculation (
oddsActualis the input to this algorithm) - F007 — RTP Margin (margin applied before rounding)
- F024 — Odds Display (UI display of
oddsRounded) - F032 — RTP Config (operator enables/disables rounding at installation)