@slot-engine/core 0.0.1 → 0.0.2
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/README.md +1 -1
- package/dist/index.d.mts +0 -7
- package/dist/index.d.ts +0 -7
- package/dist/index.js +9 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -1
- package/.turbo/turbo-build.log +0 -33
- package/.turbo/turbo-typecheck.log +0 -4
- package/CHANGELOG.md +0 -7
- package/index.ts +0 -205
- package/lib/zstd.exe +0 -0
- package/optimizer-rust/Cargo.toml +0 -19
- package/optimizer-rust/src/exes.rs +0 -154
- package/optimizer-rust/src/main.rs +0 -1659
- package/src/Board.ts +0 -527
- package/src/Book.ts +0 -83
- package/src/GameConfig.ts +0 -148
- package/src/GameMode.ts +0 -86
- package/src/GameState.ts +0 -272
- package/src/GameSymbol.ts +0 -61
- package/src/ReelGenerator.ts +0 -589
- package/src/ResultSet.ts +0 -207
- package/src/Simulation.ts +0 -625
- package/src/SlotGame.ts +0 -117
- package/src/Wallet.ts +0 -203
- package/src/WinType.ts +0 -102
- package/src/analysis/index.ts +0 -198
- package/src/analysis/utils.ts +0 -128
- package/src/optimizer/OptimizationConditions.ts +0 -99
- package/src/optimizer/OptimizationParameters.ts +0 -46
- package/src/optimizer/OptimizationScaling.ts +0 -18
- package/src/optimizer/index.ts +0 -142
- package/src/utils/math-config.ts +0 -109
- package/src/utils/setup-file.ts +0 -36
- package/src/utils/zstd.ts +0 -28
- package/src/winTypes/ClusterWinType.ts +0 -3
- package/src/winTypes/LinesWinType.ts +0 -208
- package/src/winTypes/ManywaysWinType.ts +0 -3
- package/tsconfig.json +0 -19
- package/utils.ts +0 -270
package/dist/index.mjs
CHANGED
|
@@ -5,7 +5,6 @@ var GameConfig = class _GameConfig {
|
|
|
5
5
|
this.config = {
|
|
6
6
|
id: opts.id,
|
|
7
7
|
name: opts.name,
|
|
8
|
-
providerNumber: opts.providerNumber,
|
|
9
8
|
gameModes: opts.gameModes,
|
|
10
9
|
symbols: /* @__PURE__ */ new Map(),
|
|
11
10
|
padSymbols: opts.padSymbols || 0,
|
|
@@ -2108,14 +2107,17 @@ Simulating game mode: ${mode}`);
|
|
|
2108
2107
|
* `weight` defaults to 1.
|
|
2109
2108
|
*/
|
|
2110
2109
|
static writeLookupTableCSV(opts) {
|
|
2111
|
-
const { gameMode,
|
|
2110
|
+
const { gameMode, library, gameConfig } = opts;
|
|
2112
2111
|
const rows = [];
|
|
2113
2112
|
for (const [bookId, book] of library.entries()) {
|
|
2114
2113
|
rows.push(`${book.id},1,${Math.round(book.getPayout())}`);
|
|
2115
2114
|
}
|
|
2116
2115
|
rows.sort((a, b) => Number(a.split(",")[0]) - Number(b.split(",")[0]));
|
|
2117
|
-
|
|
2118
|
-
|
|
2116
|
+
let outputFileName = `lookUpTable_${gameMode}.csv`;
|
|
2117
|
+
let outputFilePath = path3.join(gameConfig.outputDir, outputFileName);
|
|
2118
|
+
writeFile(outputFilePath, rows.join("\n"));
|
|
2119
|
+
outputFileName = `lookUpTable_${gameMode}_0.csv`;
|
|
2120
|
+
outputFilePath = path3.join(gameConfig.outputDir, outputFileName);
|
|
2119
2121
|
writeFile(outputFilePath, rows.join("\n"));
|
|
2120
2122
|
return outputFilePath;
|
|
2121
2123
|
}
|
|
@@ -2123,7 +2125,7 @@ Simulating game mode: ${mode}`);
|
|
|
2123
2125
|
* Creates a CSV file in the format "simulationId,criteria,payoutBase,payoutFreespins".
|
|
2124
2126
|
*/
|
|
2125
2127
|
static writeLookupTableSegmentedCSV(opts) {
|
|
2126
|
-
const { gameMode,
|
|
2128
|
+
const { gameMode, library, gameConfig } = opts;
|
|
2127
2129
|
const rows = [];
|
|
2128
2130
|
for (const [bookId, book] of library.entries()) {
|
|
2129
2131
|
rows.push(
|
|
@@ -2131,7 +2133,7 @@ Simulating game mode: ${mode}`);
|
|
|
2131
2133
|
);
|
|
2132
2134
|
}
|
|
2133
2135
|
rows.sort((a, b) => Number(a.split(",")[0]) - Number(b.split(",")[0]));
|
|
2134
|
-
const outputFileName =
|
|
2136
|
+
const outputFileName = `lookUpTableSegmented_${gameMode}.csv`;
|
|
2135
2137
|
const outputFilePath = path3.join(gameConfig.outputDir, outputFileName);
|
|
2136
2138
|
writeFile(outputFilePath, rows.join("\n"));
|
|
2137
2139
|
return outputFilePath;
|
|
@@ -2825,7 +2827,7 @@ var SlotGame = class {
|
|
|
2825
2827
|
console.log("No tasks to run. Enable either simulation, optimization or analysis.");
|
|
2826
2828
|
}
|
|
2827
2829
|
if (opts.doSimulation) {
|
|
2828
|
-
await this.runSimulation(
|
|
2830
|
+
await this.runSimulation(opts.simulationOpts || {});
|
|
2829
2831
|
}
|
|
2830
2832
|
if (opts.doOptimization) {
|
|
2831
2833
|
await this.runOptimization(opts.optimizationOpts || { gameModes: [] });
|