@slot-engine/core 0.1.1 → 0.1.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.
@@ -1,3 +1,5 @@
1
+ #![allow(unused)]
2
+
1
3
  use csv::ReaderBuilder;
2
4
  use serde::{Deserialize, Serialize};
3
5
  use serde_json;
@@ -1,3 +1,6 @@
1
+ #![allow(unused)]
2
+ #![allow(non_snake_case)]
3
+
1
4
  use exes::IdentityCondition;
2
5
  use ndarray::{s, Array1};
3
6
  use rand::prelude::*;
@@ -225,6 +228,7 @@ fn run_farm(
225
228
  sort_wins_by_parameter(&mut fence, &force_options, &mut lookup_table);
226
229
 
227
230
  if !fence.win_type {
231
+ let fence_name = fence.name.clone();
228
232
  let mut win_range_params: Vec<&mut Dress> = Vec::new();
229
233
  for dress in &mut fence.dresses {
230
234
  win_range_params.push(dress);
@@ -265,6 +269,7 @@ fn run_farm(
265
269
  &pig_heaven,
266
270
  fence.min_mean_to_median,
267
271
  fence.max_mean_to_median,
272
+ fence_name.clone(),
268
273
  )
269
274
  })
270
275
  .collect()
@@ -985,6 +990,7 @@ fn create_ancestors(
985
990
  pig_heaven: &PigHeaven,
986
991
  min_mean_to_median: f64,
987
992
  max_mean_to_median: f64,
993
+ fence_name: String,
988
994
  ) -> Vec<Pig> {
989
995
  let mut pos_pigs: Vec<Pig> = Vec::with_capacity((pig_heaven.num_pigs as f64).sqrt() as usize);
990
996
  let mut neg_pigs: Vec<Pig> = Vec::with_capacity((pig_heaven.num_pigs as f64).sqrt() as usize);
@@ -1175,12 +1181,16 @@ fn create_ancestors(
1175
1181
  if loop_count > 5 * pig_heaven.num_pigs {
1176
1182
  if neg_pigs.len() > pos_pigs.len() {
1177
1183
  if !already_printed {
1178
- println!("RTP too low...");
1184
+ println!("Unable to optimize! RTP too low... Exit this process manually.");
1185
+ println!("At: {}", fence_name);
1186
+ println!("Possible causes: Not enough variance/range in wins.");
1179
1187
  already_printed = true;
1180
1188
  }
1181
1189
  } else {
1182
1190
  if !already_printed {
1183
- println!("RTP too high...");
1191
+ println!("Unable to optimize! RTP too high... Exit this process manually.");
1192
+ println!("At: {}", fence_name);
1193
+ println!("Possible causes: Not enough variance/range in wins.");
1184
1194
  already_printed = true;
1185
1195
  }
1186
1196
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slot-engine/core",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/slot-engine/slot-engine"