@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.
Files changed (42) hide show
  1. package/README.md +1 -1
  2. package/dist/index.d.mts +0 -7
  3. package/dist/index.d.ts +0 -7
  4. package/dist/index.js +9 -7
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.mjs +9 -7
  7. package/dist/index.mjs.map +1 -1
  8. package/package.json +5 -1
  9. package/.turbo/turbo-build.log +0 -33
  10. package/.turbo/turbo-typecheck.log +0 -4
  11. package/CHANGELOG.md +0 -7
  12. package/index.ts +0 -205
  13. package/lib/zstd.exe +0 -0
  14. package/optimizer-rust/Cargo.toml +0 -19
  15. package/optimizer-rust/src/exes.rs +0 -154
  16. package/optimizer-rust/src/main.rs +0 -1659
  17. package/src/Board.ts +0 -527
  18. package/src/Book.ts +0 -83
  19. package/src/GameConfig.ts +0 -148
  20. package/src/GameMode.ts +0 -86
  21. package/src/GameState.ts +0 -272
  22. package/src/GameSymbol.ts +0 -61
  23. package/src/ReelGenerator.ts +0 -589
  24. package/src/ResultSet.ts +0 -207
  25. package/src/Simulation.ts +0 -625
  26. package/src/SlotGame.ts +0 -117
  27. package/src/Wallet.ts +0 -203
  28. package/src/WinType.ts +0 -102
  29. package/src/analysis/index.ts +0 -198
  30. package/src/analysis/utils.ts +0 -128
  31. package/src/optimizer/OptimizationConditions.ts +0 -99
  32. package/src/optimizer/OptimizationParameters.ts +0 -46
  33. package/src/optimizer/OptimizationScaling.ts +0 -18
  34. package/src/optimizer/index.ts +0 -142
  35. package/src/utils/math-config.ts +0 -109
  36. package/src/utils/setup-file.ts +0 -36
  37. package/src/utils/zstd.ts +0 -28
  38. package/src/winTypes/ClusterWinType.ts +0 -3
  39. package/src/winTypes/LinesWinType.ts +0 -208
  40. package/src/winTypes/ManywaysWinType.ts +0 -3
  41. package/tsconfig.json +0 -19
  42. 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, fileNameWithoutExtension, library, gameConfig } = opts;
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
- const outputFileName = fileNameWithoutExtension ? `${fileNameWithoutExtension}.csv` : `lookUpTable_${gameMode}.csv`;
2118
- const outputFilePath = path3.join(gameConfig.outputDir, outputFileName);
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, fileNameWithoutExtension, library, gameConfig } = opts;
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 = fileNameWithoutExtension ? `${fileNameWithoutExtension}.csv` : `lookUpTableSegmented_${gameMode}.csv`;
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({ debug: opts.debug });
2830
+ await this.runSimulation(opts.simulationOpts || {});
2829
2831
  }
2830
2832
  if (opts.doOptimization) {
2831
2833
  await this.runOptimization(opts.optimizationOpts || { gameModes: [] });