@slot-engine/core 0.1.0 → 0.1.1

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.
package/dist/index.d.mts CHANGED
@@ -1232,8 +1232,7 @@ type WinCombination = {
1232
1232
  posIndex: number;
1233
1233
  }>;
1234
1234
  };
1235
- type PostProcessFn<TWinCombs extends WinCombination[]> = (winType: WinType, ctx: GameContext) => {
1236
- payout: number;
1235
+ type PostProcessFn<TWinCombs extends WinCombination[]> = (wins: TWinCombs, ctx: GameContext) => {
1237
1236
  winCombinations: TWinCombs;
1238
1237
  };
1239
1238
  type WildSymbol = GameSymbol | Record<string, any>;
package/dist/index.d.ts CHANGED
@@ -1232,8 +1232,7 @@ type WinCombination = {
1232
1232
  posIndex: number;
1233
1233
  }>;
1234
1234
  };
1235
- type PostProcessFn<TWinCombs extends WinCombination[]> = (winType: WinType, ctx: GameContext) => {
1236
- payout: number;
1235
+ type PostProcessFn<TWinCombs extends WinCombination[]> = (wins: TWinCombs, ctx: GameContext) => {
1237
1236
  winCombinations: TWinCombs;
1238
1237
  };
1239
1238
  type WildSymbol = GameSymbol | Record<string, any>;
package/dist/index.js CHANGED
@@ -2635,9 +2635,9 @@ var WinType = class {
2635
2635
  * Custom post-processing of wins, e.g. for handling multipliers.
2636
2636
  */
2637
2637
  postProcess(func) {
2638
- const result = func(this, this.ctx);
2639
- this.payout = result.payout;
2638
+ const result = func(this.winCombinations, this.ctx);
2640
2639
  this.winCombinations = result.winCombinations;
2640
+ this.payout = result.winCombinations.reduce((sum, w) => sum + w.payout, 0);
2641
2641
  return this;
2642
2642
  }
2643
2643
  /**