raspberry_games_server_game_logic 1.8.432 → 1.8.434

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.
@@ -402,7 +402,7 @@
402
402
  initMetadataForClass(AppEnvironmentValue, 'AppEnvironmentValue', VOID, Enum);
403
403
  //endregion
404
404
  function GameEngineConfig() {
405
- this.version = '1.8.432';
405
+ this.version = '1.8.434';
406
406
  }
407
407
  protoOf(GameEngineConfig).b3w = function () {
408
408
  return this.version;
@@ -1396,6 +1396,7 @@
1396
1396
  initMetadataForInterface(RatingHelper, 'RatingHelper');
1397
1397
  initMetadataForClass(RatingHelperImpl, 'RatingHelperImpl', VOID, VOID, [RatingHelper]);
1398
1398
  initMetadataForClass(EngineHelpersFactory, 'EngineHelpersFactory', EngineHelpersFactory);
1399
+ initMetadataForClass(BotRatingRange, 'BotRatingRange');
1399
1400
  //endregion
1400
1401
  function Companion() {
1401
1402
  Companion_instance_4 = this;
@@ -59266,24 +59267,6 @@
59266
59267
  function GameHelperImpl(logger) {
59267
59268
  this.k9o_1 = logger;
59268
59269
  }
59269
- protoOf(GameHelperImpl).getBotRatingRange = function (league) {
59270
- var tmp;
59271
- if (league == null) {
59272
- tmp = Default_getInstance().qg() ? League_BEGINNER_getInstance() : League_ROOKIE_getInstance();
59273
- } else {
59274
- tmp = this.mapToLeague(league);
59275
- }
59276
- var targetLeague = tmp;
59277
- var defaultConfig = Companion_instance_12.defaultConfig();
59278
- var minRating = targetLeague.getMinRating();
59279
- var maxRating = targetLeague.getMaxRating(defaultConfig.maxUserRating);
59280
- var factor = 0.3;
59281
- var botMaxRating = numberToInt(minRating + (maxRating - minRating | 0) * factor);
59282
- // Inline function 'kotlin.arrayOf' call
59283
- // Inline function 'kotlin.js.unsafeCast' call
59284
- // Inline function 'kotlin.js.asDynamic' call
59285
- return [minRating, botMaxRating];
59286
- };
59287
59270
  protoOf(GameHelperImpl).h9o = function (store, playerIds, includeBots) {
59288
59271
  var state = store.state;
59289
59272
  var tmp;
@@ -60226,6 +60209,27 @@
60226
60209
  this.a9p_1 = json;
60227
60210
  this.b9p_1 = userRatingInteractor;
60228
60211
  }
60212
+ protoOf(RatingHelperImpl).getBotRatingRange = function (league) {
60213
+ var tmp;
60214
+ if (league == null) {
60215
+ tmp = Default_getInstance().qg() ? League_BEGINNER_getInstance() : League_ROOKIE_getInstance();
60216
+ } else {
60217
+ tmp = this.mapToLeague(league);
60218
+ }
60219
+ var targetLeague = tmp;
60220
+ var defaultConfig = Companion_instance_12.defaultConfig();
60221
+ var minRating = targetLeague.getMinRating();
60222
+ var maxRating = targetLeague.getMaxRating(defaultConfig.maxUserRating);
60223
+ var factor = 0.3;
60224
+ var botMaxRating = numberToInt(minRating + (maxRating - minRating | 0) * factor);
60225
+ return new BotRatingRange(minRating, botMaxRating);
60226
+ };
60227
+ protoOf(RatingHelperImpl).mapToLeague = function (name) {
60228
+ // Inline function 'kotlin.text.uppercase' call
60229
+ // Inline function 'kotlin.js.asDynamic' call
60230
+ var tmp$ret$1 = name.toUpperCase();
60231
+ return valueOf_0(tmp$ret$1);
60232
+ };
60229
60233
  protoOf(RatingHelperImpl).isValidRatingForLeague = function (league, rating) {
60230
60234
  return this.b9p_1.b8z(league, rating);
60231
60235
  };
@@ -60535,6 +60539,49 @@
60535
60539
  getPropertyCallableRef('gameResources', 1, tmp, EngineHelpersFactory$_get_gameResources_$ref_kynd2o_0(), null);
60536
60540
  return tmp0.x();
60537
60541
  };
60542
+ function BotRatingRange(min, max) {
60543
+ this.min = min;
60544
+ this.max = max;
60545
+ }
60546
+ protoOf(BotRatingRange).n9p = function () {
60547
+ return this.min;
60548
+ };
60549
+ protoOf(BotRatingRange).o9p = function () {
60550
+ return this.max;
60551
+ };
60552
+ protoOf(BotRatingRange).oe = function () {
60553
+ return this.min;
60554
+ };
60555
+ protoOf(BotRatingRange).pe = function () {
60556
+ return this.max;
60557
+ };
60558
+ protoOf(BotRatingRange).p9p = function (min, max) {
60559
+ return new BotRatingRange(min, max);
60560
+ };
60561
+ protoOf(BotRatingRange).copy = function (min, max, $super) {
60562
+ min = min === VOID ? this.min : min;
60563
+ max = max === VOID ? this.max : max;
60564
+ return $super === VOID ? this.p9p(min, max) : $super.p9p.call(this, min, max);
60565
+ };
60566
+ protoOf(BotRatingRange).toString = function () {
60567
+ return 'BotRatingRange(min=' + this.min + ', max=' + this.max + ')';
60568
+ };
60569
+ protoOf(BotRatingRange).hashCode = function () {
60570
+ var result = this.min;
60571
+ result = imul(result, 31) + this.max | 0;
60572
+ return result;
60573
+ };
60574
+ protoOf(BotRatingRange).equals = function (other) {
60575
+ if (this === other)
60576
+ return true;
60577
+ if (!(other instanceof BotRatingRange))
60578
+ return false;
60579
+ if (!(this.min === other.min))
60580
+ return false;
60581
+ if (!(this.max === other.max))
60582
+ return false;
60583
+ return true;
60584
+ };
60538
60585
  //region block: post-declaration
60539
60586
  defineProp(protoOf(GameLifecycleState), 'isActive', protoOf(GameLifecycleState).g1p);
60540
60587
  defineProp(protoOf(GameLifecycleState), 'isFinishing', protoOf(GameLifecycleState).s6t);
@@ -62256,6 +62303,8 @@
62256
62303
  defineProp(_, 'WARN', get_WARN, VOID, true);
62257
62304
  var $di = _.di || (_.di = {});
62258
62305
  $di.EngineHelpersFactory = EngineHelpersFactory;
62306
+ var $models = _.models || (_.models = {});
62307
+ $models.BotRatingRange = BotRatingRange;
62259
62308
  }
62260
62309
  $jsExportAll$(_);
62261
62310
  _.$jsExportAll$ = $jsExportAll$;