game_client_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.
@@ -383,7 +383,7 @@
383
383
  initMetadataForClass(AppEnvironmentValue, 'AppEnvironmentValue', VOID, Enum);
384
384
  //endregion
385
385
  function GameEngineConfig() {
386
- this.version = '1.8.369';
386
+ this.version = '1.8.370';
387
387
  }
388
388
  protoOf(GameEngineConfig).u3u = function () {
389
389
  return this.version;
@@ -42910,7 +42910,7 @@
42910
42910
  }
42911
42911
  }
42912
42912
  function clampAndRound($this, value, minUserRating, maxUserRating) {
42913
- var upper = false ? maxUserRating : 1.7976931348623157E308;
42913
+ var upper = maxUserRating;
42914
42914
  var clamped = coerceIn(value, minUserRating, upper);
42915
42915
  // Inline function 'kotlin.math.pow' call
42916
42916
  var factor = Math.pow(10.0, 2);
@@ -48834,6 +48834,54 @@
48834
48834
  // Inline function 'com.logic.redux.store.definitions.middlewareForActionType' call
48835
48835
  return new roundLifecycleMiddleware$$inlined$middlewareForActionType$1(scenePositionProvider, logger);
48836
48836
  }
48837
+ function validateRatingChange(logger, playerAchievements) {
48838
+ var tmp;
48839
+ if (playerAchievements == null) {
48840
+ tmp = null;
48841
+ } else {
48842
+ // Inline function 'kotlin.collections.filter' call
48843
+ // Inline function 'kotlin.collections.filterTo' call
48844
+ var destination = ArrayList_init_$Create$_0();
48845
+ var _iterator__ex2g4s = playerAchievements.l();
48846
+ while (_iterator__ex2g4s.m()) {
48847
+ var element = _iterator__ex2g4s.n();
48848
+ // Inline function 'kotlin.math.absoluteValue' call
48849
+ var this_0 = element.oldRating - element.newRating;
48850
+ if (Math.abs(this_0) >= 80) {
48851
+ destination.j(element);
48852
+ }
48853
+ }
48854
+ tmp = destination;
48855
+ }
48856
+ var tmp1_elvis_lhs = tmp;
48857
+ var suspiciousRatingChange = tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs;
48858
+ // Inline function 'kotlin.collections.isNotEmpty' call
48859
+ if (!suspiciousRatingChange.r()) {
48860
+ logger.w('roundLifecycleMiddleware', 'Suspicious rating change: ' + toString(suspiciousRatingChange));
48861
+ }
48862
+ var tmp_0;
48863
+ if (playerAchievements == null) {
48864
+ tmp_0 = null;
48865
+ } else {
48866
+ // Inline function 'kotlin.collections.filter' call
48867
+ // Inline function 'kotlin.collections.filterTo' call
48868
+ var destination_0 = ArrayList_init_$Create$_0();
48869
+ var _iterator__ex2g4s_0 = playerAchievements.l();
48870
+ while (_iterator__ex2g4s_0.m()) {
48871
+ var element_0 = _iterator__ex2g4s_0.n();
48872
+ if (element_0.oldRating < 2000 && element_0.newRating > 2000) {
48873
+ destination_0.j(element_0);
48874
+ }
48875
+ }
48876
+ tmp_0 = destination_0;
48877
+ }
48878
+ var tmp3_elvis_lhs = tmp_0;
48879
+ var ratingChangeAboveLimit = tmp3_elvis_lhs == null ? emptyList() : tmp3_elvis_lhs;
48880
+ // Inline function 'kotlin.collections.isNotEmpty' call
48881
+ if (!ratingChangeAboveLimit.r()) {
48882
+ logger.w('roundLifecycleMiddleware', 'Rating change above limit: ' + toString(suspiciousRatingChange));
48883
+ }
48884
+ }
48837
48885
  function roundLifecycleMiddleware$$inlined$middlewareForActionType$1($scenePositionProvider, $logger) {
48838
48886
  this.y8x_1 = $scenePositionProvider;
48839
48887
  this.z8x_1 = $logger;
@@ -48953,105 +49001,60 @@
48953
49001
  tmp_3 = destination_2;
48954
49002
  }
48955
49003
  var playerAchievements = tmp_3;
48956
- var tmp_4;
48957
- if (playerAchievements == null) {
48958
- tmp_4 = null;
48959
- } else {
48960
- // Inline function 'kotlin.collections.filter' call
48961
- // Inline function 'kotlin.collections.filterTo' call
48962
- var destination_3 = ArrayList_init_$Create$_0();
48963
- var _iterator__ex2g4s_3 = playerAchievements.l();
48964
- while (_iterator__ex2g4s_3.m()) {
48965
- var element_0 = _iterator__ex2g4s_3.n();
48966
- // Inline function 'kotlin.math.absoluteValue' call
48967
- var this_2 = element_0.oldRating - element_0.newRating;
48968
- if (Math.abs(this_2) >= 60) {
48969
- destination_3.j(element_0);
48970
- }
48971
- }
48972
- tmp_4 = destination_3;
48973
- }
48974
- var tmp14_elvis_lhs = tmp_4;
48975
- var suspiciousRatingChange = tmp14_elvis_lhs == null ? emptyList() : tmp14_elvis_lhs;
48976
- // Inline function 'kotlin.collections.isNotEmpty' call
48977
- if (!suspiciousRatingChange.r()) {
48978
- this.z8x_1.w('roundLifecycleMiddleware', 'Suspicious rating change: ' + toString(suspiciousRatingChange));
48979
- }
49004
+ validateRatingChange(this.z8x_1, playerAchievements);
49005
+ var tmp_4 = store.dispatch;
49006
+ var tmp15_id = table_0.id;
49007
+ var tmp16_gameId = table_0.gameId;
49008
+ var tmp17_roundNumber = table_0.gameInfo.round.roundNumber;
49009
+ var tmp18_earnedBiggestPointPlayerId = sceneData.h76_1;
48980
49010
  var tmp_5;
48981
- if (playerAchievements == null) {
48982
- tmp_5 = null;
48983
- } else {
48984
- // Inline function 'kotlin.collections.filter' call
48985
- // Inline function 'kotlin.collections.filterTo' call
48986
- var destination_4 = ArrayList_init_$Create$_0();
48987
- var _iterator__ex2g4s_4 = playerAchievements.l();
48988
- while (_iterator__ex2g4s_4.m()) {
48989
- var element_1 = _iterator__ex2g4s_4.n();
48990
- if (element_1.oldRating < 2000 && element_1.newRating > 2000) {
48991
- destination_4.j(element_1);
48992
- }
48993
- }
48994
- tmp_5 = destination_4;
48995
- }
48996
- var tmp16_elvis_lhs = tmp_5;
48997
- var ratingChangeAboveLimit = tmp16_elvis_lhs == null ? emptyList() : tmp16_elvis_lhs;
48998
- // Inline function 'kotlin.collections.isNotEmpty' call
48999
- if (!ratingChangeAboveLimit.r()) {
49000
- this.z8x_1.w('roundLifecycleMiddleware', 'Rating change above limit: ' + toString(suspiciousRatingChange));
49001
- }
49002
- var tmp_6 = store.dispatch;
49003
- var tmp19_id = table_0.id;
49004
- var tmp20_gameId = table_0.gameId;
49005
- var tmp21_roundNumber = table_0.gameInfo.round.roundNumber;
49006
- var tmp22_earnedBiggestPointPlayerId = sceneData.h76_1;
49007
- var tmp_7;
49008
49011
  if (gameWinners == null) {
49009
- tmp_7 = null;
49012
+ tmp_5 = null;
49010
49013
  } else {
49011
49014
  // Inline function 'kotlin.collections.toTypedArray' call
49012
- tmp_7 = copyToArray(gameWinners);
49015
+ tmp_5 = copyToArray(gameWinners);
49013
49016
  }
49014
- var tmp23_gameWinners = tmp_7;
49015
- var tmp_8;
49017
+ var tmp19_gameWinners = tmp_5;
49018
+ var tmp_6;
49016
49019
  if (isGameFinished) {
49017
49020
  // Inline function 'kotlin.collections.map' call
49018
- var this_3 = table_0.players;
49021
+ var this_2 = table_0.players;
49019
49022
  // Inline function 'kotlin.collections.mapTo' call
49020
- var destination_5 = ArrayList_init_$Create$(collectionSizeOrDefault(this_3, 10));
49021
- var _iterator__ex2g4s_5 = this_3.l();
49022
- while (_iterator__ex2g4s_5.m()) {
49023
- var item_2 = _iterator__ex2g4s_5.n();
49024
- var tmp$ret$32 = mapToGameAnalytics(item_2, table_0.gameDuration);
49025
- destination_5.j(tmp$ret$32);
49023
+ var destination_3 = ArrayList_init_$Create$(collectionSizeOrDefault(this_2, 10));
49024
+ var _iterator__ex2g4s_3 = this_2.l();
49025
+ while (_iterator__ex2g4s_3.m()) {
49026
+ var item_2 = _iterator__ex2g4s_3.n();
49027
+ var tmp$ret$23 = mapToGameAnalytics(item_2, table_0.gameDuration);
49028
+ destination_3.j(tmp$ret$23);
49026
49029
  }
49027
49030
  // Inline function 'kotlin.collections.toTypedArray' call
49028
- tmp_8 = copyToArray(destination_5);
49031
+ tmp_6 = copyToArray(destination_3);
49029
49032
  } else {
49030
- tmp_8 = null;
49033
+ tmp_6 = null;
49031
49034
  }
49032
- var tmp24_playersGameAnalytics = tmp_8;
49035
+ var tmp20_playersGameAnalytics = tmp_6;
49033
49036
  // Inline function 'kotlin.collections.map' call
49034
- var this_4 = table_0.players;
49037
+ var this_3 = table_0.players;
49035
49038
  // Inline function 'kotlin.collections.mapTo' call
49036
- var destination_6 = ArrayList_init_$Create$(collectionSizeOrDefault(this_4, 10));
49037
- var _iterator__ex2g4s_6 = this_4.l();
49038
- while (_iterator__ex2g4s_6.m()) {
49039
- var item_3 = _iterator__ex2g4s_6.n();
49040
- var tmp$ret$36 = mapToRoundAnalytics(item_3, table_0.gameDuration);
49041
- destination_6.j(tmp$ret$36);
49039
+ var destination_4 = ArrayList_init_$Create$(collectionSizeOrDefault(this_3, 10));
49040
+ var _iterator__ex2g4s_4 = this_3.l();
49041
+ while (_iterator__ex2g4s_4.m()) {
49042
+ var item_3 = _iterator__ex2g4s_4.n();
49043
+ var tmp$ret$27 = mapToRoundAnalytics(item_3, table_0.gameDuration);
49044
+ destination_4.j(tmp$ret$27);
49042
49045
  }
49043
49046
  // Inline function 'kotlin.collections.toTypedArray' call
49044
- var tmp25_playersRoundAnalytics = copyToArray(destination_6);
49045
- var tmp26_gameHistory = table_0.gameHistory;
49046
- var tmp_9;
49047
+ var tmp21_playersRoundAnalytics = copyToArray(destination_4);
49048
+ var tmp22_gameHistory = table_0.gameHistory;
49049
+ var tmp_7;
49047
49050
  if (playerAchievements == null) {
49048
- tmp_9 = null;
49051
+ tmp_7 = null;
49049
49052
  } else {
49050
49053
  // Inline function 'kotlin.collections.toTypedArray' call
49051
- tmp_9 = copyToArray(playerAchievements);
49054
+ tmp_7 = copyToArray(playerAchievements);
49052
49055
  }
49053
- var tmp27_achievements = tmp_9;
49054
- tmp_6(new RoundEndedAction(tmp19_id, tmp20_gameId, tmp21_roundNumber, tmp22_earnedBiggestPointPlayerId, gameLosers, tmp23_gameWinners, tmp24_playersGameAnalytics, tmp25_playersRoundAnalytics, tmp27_achievements, tmp26_gameHistory));
49056
+ var tmp23_achievements = tmp_7;
49057
+ tmp_4(new RoundEndedAction(tmp15_id, tmp16_gameId, tmp17_roundNumber, tmp18_earnedBiggestPointPlayerId, gameLosers, tmp19_gameWinners, tmp20_playersGameAnalytics, tmp21_playersRoundAnalytics, tmp23_achievements, tmp22_gameHistory));
49055
49058
  }
49056
49059
  }
49057
49060
  }
@@ -53249,7 +53252,7 @@
53249
53252
  var tmp3_bribes = emptyList();
53250
53253
  var tmp4_gameInfo = roundFinishedGameInfoReducer(this, table);
53251
53254
  var tmp5_gameHistory = this.i95_1.d95(table.gameHistory);
53252
- return table.copy(VOID, VOID, VOID, VOID, destination, VOID, tmp0_sceneInfo, tmp2_cardsOnTable, tmp3_bribes, null, VOID, tmp4_gameInfo, tmp5_gameHistory);
53255
+ return table.copy(VOID, VOID, VOID, VOID, destination, VOID, tmp0_sceneInfo, tmp2_cardsOnTable, tmp3_bribes, VOID, VOID, tmp4_gameInfo, tmp5_gameHistory);
53253
53256
  };
53254
53257
  protoOf(TableLifecycleReducerImpl).x94 = function (table) {
53255
53258
  // Inline function 'kotlin.collections.map' call