@betorigami/game-ui-shared 6.0.2 → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -48,8 +48,9 @@ export type ChipEvent = {
|
|
|
48
48
|
position: string;
|
|
49
49
|
amount: number;
|
|
50
50
|
} | {
|
|
51
|
-
type: '
|
|
52
|
-
|
|
51
|
+
type: 'scale';
|
|
52
|
+
from: string;
|
|
53
|
+
to: string;
|
|
53
54
|
};
|
|
54
55
|
/**
|
|
55
56
|
* Static utility class for managing chip state via event sourcing.
|
|
@@ -119,7 +120,8 @@ export declare class ChipStateUtils {
|
|
|
119
120
|
* Uses Big.js for precise decimal arithmetic to avoid floating-point issues.
|
|
120
121
|
* @param events - Array of chip events
|
|
121
122
|
* @param maxBetAmount - Maximum total bet amount allowed (caps doubling proportionally)
|
|
122
|
-
* @
|
|
123
|
+
* @param decimals - Decimal places of the currency
|
|
124
|
+
* @returns Map of position to total amount (rounded down to the currency's decimal places)
|
|
123
125
|
*/
|
|
124
|
-
static deriveState(events: ChipEvent[], maxBetAmount: Big): Map<string, number>;
|
|
126
|
+
static deriveState(events: ChipEvent[], maxBetAmount: Big, decimals: number): Map<string, number>;
|
|
125
127
|
}
|
package/package.json
CHANGED