TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/StakeEngine/math-sdk/llms.txt
Use this file to discover all available pages before exploring further.
Ways class evaluates wins for games where any matching symbol combination across consecutive reels pays — without requiring specific payline definitions. The total number of winning combinations is the product of matching symbol counts per reel.
How ways wins work
For each unique symbol on the board, the engine counts how many positions on each consecutive reel contain that symbol (or a wild). The number of ways is the product of those per-reel counts:paytable[(kind, symbol)] × ways.
For a 5-reel, 3-row board the theoretical maximum is 3⁵ = 243 ways for any given symbol.
The ways calculation does not account for wild symbols appearing on reel 0. Wilds only substitute on reels 1 and beyond.
Configuration
Maps
(kind, symbol) tuples to base payout multipliers. kind is the number of consecutive reels the symbol appears on.Ways.get_ways_data()
Game configuration with
config.paytable and config.special_symbols populated.The active game board indexed as
board[reel][row].Symbol attribute key identifying wild symbols.
Scalar multiplier applied to all wins when
multiplier_strategy is "global" or "board".Symbol attribute key for reading per-symbol multiplier values.
One of
"symbol", "board", or "global". See Multiplier strategies.Return value
Sum of all ways wins for this board state.
One entry per winning symbol type.
Wild handling
Wild symbols contribute to ways counts on reels 1 and beyond. When using the"symbol" multiplier strategy, a wild with a multiplier attribute adds its multiplier value to the reel’s symbol count rather than 1 — so a 3× wild on reel 2 contributes 3 to the ways product:
Multiplier strategies
| Strategy | Behavior |
|---|---|
"symbol" | Wild symbols with a multiplier attribute multiply the ways count for that reel. |
"board" | Multiplier attribute values from all winning positions are accumulated and applied as a global scalar. |
"global" | All wins are scaled uniformly by global_multiplier. |
Additional methods
Ways.emit_wayswin_events(gamestate)
Emits win_info, set_win, and set_total events if win_manager.spin_win > 0.
Ways.record_ways_wins(gamestate)
Writes force-file entries keyed by kind, symbol, ways, and gametype.
