client_plugin_logic_deb 1.8.369 → 1.8.370

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.
@@ -415,7 +415,7 @@
415
415
  initMetadataForClass(AppEnvironmentValue, 'AppEnvironmentValue', VOID, Enum);
416
416
  //endregion
417
417
  function GameEngineConfig() {
418
- this.version = '1.8.369';
418
+ this.version = '1.8.370';
419
419
  }
420
420
  protoOf(GameEngineConfig).e3y = function () {
421
421
  return this.version;
@@ -48407,7 +48407,7 @@
48407
48407
  }
48408
48408
  }
48409
48409
  function clampAndRound($this, value, minUserRating, maxUserRating) {
48410
- var upper = false ? maxUserRating : 1.7976931348623157E308;
48410
+ var upper = maxUserRating;
48411
48411
  var clamped = coerceIn(value, minUserRating, upper);
48412
48412
  // Inline function 'kotlin.math.pow' call
48413
48413
  var factor = Math.pow(10.0, 2);
@@ -55765,6 +55765,54 @@
55765
55765
  // Inline function 'com.logic.redux.store.definitions.middlewareForActionType' call
55766
55766
  return new roundLifecycleMiddleware$$inlined$middlewareForActionType$1(scenePositionProvider, logger);
55767
55767
  }
55768
+ function validateRatingChange(logger, playerAchievements) {
55769
+ var tmp;
55770
+ if (playerAchievements == null) {
55771
+ tmp = null;
55772
+ } else {
55773
+ // Inline function 'kotlin.collections.filter' call
55774
+ // Inline function 'kotlin.collections.filterTo' call
55775
+ var destination = ArrayList_init_$Create$_0();
55776
+ var _iterator__ex2g4s = playerAchievements.l();
55777
+ while (_iterator__ex2g4s.m()) {
55778
+ var element = _iterator__ex2g4s.n();
55779
+ // Inline function 'kotlin.math.absoluteValue' call
55780
+ var this_0 = element.oldRating - element.newRating;
55781
+ if (Math.abs(this_0) >= 80) {
55782
+ destination.j(element);
55783
+ }
55784
+ }
55785
+ tmp = destination;
55786
+ }
55787
+ var tmp1_elvis_lhs = tmp;
55788
+ var suspiciousRatingChange = tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs;
55789
+ // Inline function 'kotlin.collections.isNotEmpty' call
55790
+ if (!suspiciousRatingChange.q()) {
55791
+ logger.w('roundLifecycleMiddleware', 'Suspicious rating change: ' + toString(suspiciousRatingChange));
55792
+ }
55793
+ var tmp_0;
55794
+ if (playerAchievements == null) {
55795
+ tmp_0 = null;
55796
+ } else {
55797
+ // Inline function 'kotlin.collections.filter' call
55798
+ // Inline function 'kotlin.collections.filterTo' call
55799
+ var destination_0 = ArrayList_init_$Create$_0();
55800
+ var _iterator__ex2g4s_0 = playerAchievements.l();
55801
+ while (_iterator__ex2g4s_0.m()) {
55802
+ var element_0 = _iterator__ex2g4s_0.n();
55803
+ if (element_0.oldRating < 2000 && element_0.newRating > 2000) {
55804
+ destination_0.j(element_0);
55805
+ }
55806
+ }
55807
+ tmp_0 = destination_0;
55808
+ }
55809
+ var tmp3_elvis_lhs = tmp_0;
55810
+ var ratingChangeAboveLimit = tmp3_elvis_lhs == null ? emptyList() : tmp3_elvis_lhs;
55811
+ // Inline function 'kotlin.collections.isNotEmpty' call
55812
+ if (!ratingChangeAboveLimit.q()) {
55813
+ logger.w('roundLifecycleMiddleware', 'Rating change above limit: ' + toString(suspiciousRatingChange));
55814
+ }
55815
+ }
55768
55816
  function roundLifecycleMiddleware$$inlined$middlewareForActionType$1($scenePositionProvider, $logger) {
55769
55817
  this.a9k_1 = $scenePositionProvider;
55770
55818
  this.b9k_1 = $logger;
@@ -55884,105 +55932,60 @@
55884
55932
  tmp_3 = destination_2;
55885
55933
  }
55886
55934
  var playerAchievements = tmp_3;
55887
- var tmp_4;
55888
- if (playerAchievements == null) {
55889
- tmp_4 = null;
55890
- } else {
55891
- // Inline function 'kotlin.collections.filter' call
55892
- // Inline function 'kotlin.collections.filterTo' call
55893
- var destination_3 = ArrayList_init_$Create$_0();
55894
- var _iterator__ex2g4s_3 = playerAchievements.l();
55895
- while (_iterator__ex2g4s_3.m()) {
55896
- var element_0 = _iterator__ex2g4s_3.n();
55897
- // Inline function 'kotlin.math.absoluteValue' call
55898
- var this_2 = element_0.oldRating - element_0.newRating;
55899
- if (Math.abs(this_2) >= 60) {
55900
- destination_3.j(element_0);
55901
- }
55902
- }
55903
- tmp_4 = destination_3;
55904
- }
55905
- var tmp14_elvis_lhs = tmp_4;
55906
- var suspiciousRatingChange = tmp14_elvis_lhs == null ? emptyList() : tmp14_elvis_lhs;
55907
- // Inline function 'kotlin.collections.isNotEmpty' call
55908
- if (!suspiciousRatingChange.q()) {
55909
- this.b9k_1.w('roundLifecycleMiddleware', 'Suspicious rating change: ' + toString(suspiciousRatingChange));
55910
- }
55935
+ validateRatingChange(this.b9k_1, playerAchievements);
55936
+ var tmp_4 = store.dispatch;
55937
+ var tmp15_id = table_0.id;
55938
+ var tmp16_gameId = table_0.gameId;
55939
+ var tmp17_roundNumber = table_0.gameInfo.round.roundNumber;
55940
+ var tmp18_earnedBiggestPointPlayerId = sceneData.r7j_1;
55911
55941
  var tmp_5;
55912
- if (playerAchievements == null) {
55913
- tmp_5 = null;
55914
- } else {
55915
- // Inline function 'kotlin.collections.filter' call
55916
- // Inline function 'kotlin.collections.filterTo' call
55917
- var destination_4 = ArrayList_init_$Create$_0();
55918
- var _iterator__ex2g4s_4 = playerAchievements.l();
55919
- while (_iterator__ex2g4s_4.m()) {
55920
- var element_1 = _iterator__ex2g4s_4.n();
55921
- if (element_1.oldRating < 2000 && element_1.newRating > 2000) {
55922
- destination_4.j(element_1);
55923
- }
55924
- }
55925
- tmp_5 = destination_4;
55926
- }
55927
- var tmp16_elvis_lhs = tmp_5;
55928
- var ratingChangeAboveLimit = tmp16_elvis_lhs == null ? emptyList() : tmp16_elvis_lhs;
55929
- // Inline function 'kotlin.collections.isNotEmpty' call
55930
- if (!ratingChangeAboveLimit.q()) {
55931
- this.b9k_1.w('roundLifecycleMiddleware', 'Rating change above limit: ' + toString(suspiciousRatingChange));
55932
- }
55933
- var tmp_6 = store.dispatch;
55934
- var tmp19_id = table_0.id;
55935
- var tmp20_gameId = table_0.gameId;
55936
- var tmp21_roundNumber = table_0.gameInfo.round.roundNumber;
55937
- var tmp22_earnedBiggestPointPlayerId = sceneData.r7j_1;
55938
- var tmp_7;
55939
55942
  if (gameWinners == null) {
55940
- tmp_7 = null;
55943
+ tmp_5 = null;
55941
55944
  } else {
55942
55945
  // Inline function 'kotlin.collections.toTypedArray' call
55943
- tmp_7 = copyToArray(gameWinners);
55946
+ tmp_5 = copyToArray(gameWinners);
55944
55947
  }
55945
- var tmp23_gameWinners = tmp_7;
55946
- var tmp_8;
55948
+ var tmp19_gameWinners = tmp_5;
55949
+ var tmp_6;
55947
55950
  if (isGameFinished) {
55948
55951
  // Inline function 'kotlin.collections.map' call
55949
- var this_3 = table_0.players;
55952
+ var this_2 = table_0.players;
55950
55953
  // Inline function 'kotlin.collections.mapTo' call
55951
- var destination_5 = ArrayList_init_$Create$(collectionSizeOrDefault(this_3, 10));
55952
- var _iterator__ex2g4s_5 = this_3.l();
55953
- while (_iterator__ex2g4s_5.m()) {
55954
- var item_2 = _iterator__ex2g4s_5.n();
55955
- var tmp$ret$32 = mapToGameAnalytics(item_2, table_0.gameDuration);
55956
- destination_5.j(tmp$ret$32);
55954
+ var destination_3 = ArrayList_init_$Create$(collectionSizeOrDefault(this_2, 10));
55955
+ var _iterator__ex2g4s_3 = this_2.l();
55956
+ while (_iterator__ex2g4s_3.m()) {
55957
+ var item_2 = _iterator__ex2g4s_3.n();
55958
+ var tmp$ret$23 = mapToGameAnalytics(item_2, table_0.gameDuration);
55959
+ destination_3.j(tmp$ret$23);
55957
55960
  }
55958
55961
  // Inline function 'kotlin.collections.toTypedArray' call
55959
- tmp_8 = copyToArray(destination_5);
55962
+ tmp_6 = copyToArray(destination_3);
55960
55963
  } else {
55961
- tmp_8 = null;
55964
+ tmp_6 = null;
55962
55965
  }
55963
- var tmp24_playersGameAnalytics = tmp_8;
55966
+ var tmp20_playersGameAnalytics = tmp_6;
55964
55967
  // Inline function 'kotlin.collections.map' call
55965
- var this_4 = table_0.players;
55968
+ var this_3 = table_0.players;
55966
55969
  // Inline function 'kotlin.collections.mapTo' call
55967
- var destination_6 = ArrayList_init_$Create$(collectionSizeOrDefault(this_4, 10));
55968
- var _iterator__ex2g4s_6 = this_4.l();
55969
- while (_iterator__ex2g4s_6.m()) {
55970
- var item_3 = _iterator__ex2g4s_6.n();
55971
- var tmp$ret$36 = mapToRoundAnalytics(item_3, table_0.gameDuration);
55972
- destination_6.j(tmp$ret$36);
55970
+ var destination_4 = ArrayList_init_$Create$(collectionSizeOrDefault(this_3, 10));
55971
+ var _iterator__ex2g4s_4 = this_3.l();
55972
+ while (_iterator__ex2g4s_4.m()) {
55973
+ var item_3 = _iterator__ex2g4s_4.n();
55974
+ var tmp$ret$27 = mapToRoundAnalytics(item_3, table_0.gameDuration);
55975
+ destination_4.j(tmp$ret$27);
55973
55976
  }
55974
55977
  // Inline function 'kotlin.collections.toTypedArray' call
55975
- var tmp25_playersRoundAnalytics = copyToArray(destination_6);
55976
- var tmp26_gameHistory = table_0.gameHistory;
55977
- var tmp_9;
55978
+ var tmp21_playersRoundAnalytics = copyToArray(destination_4);
55979
+ var tmp22_gameHistory = table_0.gameHistory;
55980
+ var tmp_7;
55978
55981
  if (playerAchievements == null) {
55979
- tmp_9 = null;
55982
+ tmp_7 = null;
55980
55983
  } else {
55981
55984
  // Inline function 'kotlin.collections.toTypedArray' call
55982
- tmp_9 = copyToArray(playerAchievements);
55985
+ tmp_7 = copyToArray(playerAchievements);
55983
55986
  }
55984
- var tmp27_achievements = tmp_9;
55985
- tmp_6(new RoundEndedAction(tmp19_id, tmp20_gameId, tmp21_roundNumber, tmp22_earnedBiggestPointPlayerId, gameLosers, tmp23_gameWinners, tmp24_playersGameAnalytics, tmp25_playersRoundAnalytics, tmp27_achievements, tmp26_gameHistory));
55987
+ var tmp23_achievements = tmp_7;
55988
+ tmp_4(new RoundEndedAction(tmp15_id, tmp16_gameId, tmp17_roundNumber, tmp18_earnedBiggestPointPlayerId, gameLosers, tmp19_gameWinners, tmp20_playersGameAnalytics, tmp21_playersRoundAnalytics, tmp23_achievements, tmp22_gameHistory));
55986
55989
  }
55987
55990
  }
55988
55991
  }
@@ -60579,7 +60582,7 @@
60579
60582
  var tmp3_bribes = emptyList();
60580
60583
  var tmp4_gameInfo = roundFinishedGameInfoReducer(this, table);
60581
60584
  var tmp5_gameHistory = this.r9s_1.m9s(table.gameHistory);
60582
- return table.copy(VOID, VOID, VOID, VOID, destination, VOID, tmp0_sceneInfo, tmp2_cardsOnTable, tmp3_bribes, null, VOID, tmp4_gameInfo, tmp5_gameHistory);
60585
+ return table.copy(VOID, VOID, VOID, VOID, destination, VOID, tmp0_sceneInfo, tmp2_cardsOnTable, tmp3_bribes, VOID, VOID, tmp4_gameInfo, tmp5_gameHistory);
60583
60586
  };
60584
60587
  protoOf(TableLifecycleReducerImpl).g9s = function (table) {
60585
60588
  // Inline function 'kotlin.collections.map' call