@slot-engine/core 0.1.4 → 0.1.5
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 +76 -64
- package/dist/index.d.ts +76 -64
- package/dist/index.js +30 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +30 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -720,6 +720,9 @@ var Board = class {
|
|
|
720
720
|
newPaddingTopSymbols[ridx].unshift(padSymbol);
|
|
721
721
|
}
|
|
722
722
|
}
|
|
723
|
+
this.lastDrawnReelStops = this.lastDrawnReelStops.map((stop, ridx) => {
|
|
724
|
+
return newFirstSymbolPositions[ridx] ?? stop;
|
|
725
|
+
});
|
|
723
726
|
return {
|
|
724
727
|
newBoardSymbols,
|
|
725
728
|
newPaddingTopSymbols
|
|
@@ -1065,6 +1068,27 @@ var GameService = class extends AbstractService {
|
|
|
1065
1068
|
this.ctx().state.totalFreespinAmount += amount;
|
|
1066
1069
|
this.ctx().state.triggeredFreespins = true;
|
|
1067
1070
|
}
|
|
1071
|
+
/**
|
|
1072
|
+
* Dedupes win symbols.
|
|
1073
|
+
*
|
|
1074
|
+
* Since it may be possible that multiple win combinations include the same symbol (e.g. Wilds),\
|
|
1075
|
+
* this method ensures that each symbol is only listed once.
|
|
1076
|
+
*
|
|
1077
|
+
* If you want to tumble based on winning symbols, run them through this method first.
|
|
1078
|
+
*/
|
|
1079
|
+
dedupeWinSymbols(winCombinations) {
|
|
1080
|
+
const symbolsMap = /* @__PURE__ */ new Map();
|
|
1081
|
+
winCombinations.forEach((wc) => {
|
|
1082
|
+
wc.symbols.forEach((s) => {
|
|
1083
|
+
symbolsMap.set(`${s.reelIndex},${s.posIndex}`, {
|
|
1084
|
+
reelIdx: s.reelIndex,
|
|
1085
|
+
rowIdx: s.posIndex
|
|
1086
|
+
});
|
|
1087
|
+
});
|
|
1088
|
+
});
|
|
1089
|
+
const symbolsToRemove = Array.from(symbolsMap.values());
|
|
1090
|
+
return symbolsToRemove;
|
|
1091
|
+
}
|
|
1068
1092
|
};
|
|
1069
1093
|
|
|
1070
1094
|
// src/service/wallet.ts
|
|
@@ -1679,7 +1703,12 @@ Simulating game mode: ${mode}`);
|
|
|
1679
1703
|
}
|
|
1680
1704
|
});
|
|
1681
1705
|
worker.on("error", (error) => {
|
|
1682
|
-
|
|
1706
|
+
process.stdout.write(`
|
|
1707
|
+
${error.message}
|
|
1708
|
+
`);
|
|
1709
|
+
process.stdout.write(`
|
|
1710
|
+
${error.stack}
|
|
1711
|
+
`);
|
|
1683
1712
|
reject(error);
|
|
1684
1713
|
});
|
|
1685
1714
|
worker.on("exit", (code) => {
|