game_client_logic_deb 1.8.369 → 1.8.371

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.371';
387
387
  }
388
388
  protoOf(GameEngineConfig).u3u = function () {
389
389
  return this.version;
@@ -42779,6 +42779,9 @@
42779
42779
  var kLoss = Math.max(tmp0, b_0);
42780
42780
  var raw = item.n6x_1 + kBase * (kWin * diffPos + kLoss * diffNeg);
42781
42781
  var newRating = clampAndRound($this, raw, minUserRating, maxUserRating);
42782
+ if (item.p6x_1 && newRating < item.n6x_1) {
42783
+ newRating = item.n6x_1;
42784
+ }
42782
42785
  tmp$ret$3 = new PlayerRatingOutput(item.m6x_1, item.n6x_1, newRating, item.p6x_1);
42783
42786
  }
42784
42787
  destination.j(tmp$ret$3);
@@ -42910,7 +42913,7 @@
42910
42913
  }
42911
42914
  }
42912
42915
  function clampAndRound($this, value, minUserRating, maxUserRating) {
42913
- var upper = false ? maxUserRating : 1.7976931348623157E308;
42916
+ var upper = maxUserRating;
42914
42917
  var clamped = coerceIn(value, minUserRating, upper);
42915
42918
  // Inline function 'kotlin.math.pow' call
42916
42919
  var factor = Math.pow(10.0, 2);
@@ -48834,6 +48837,54 @@
48834
48837
  // Inline function 'com.logic.redux.store.definitions.middlewareForActionType' call
48835
48838
  return new roundLifecycleMiddleware$$inlined$middlewareForActionType$1(scenePositionProvider, logger);
48836
48839
  }
48840
+ function validateRatingChange(logger, playerAchievements) {
48841
+ var tmp;
48842
+ if (playerAchievements == null) {
48843
+ tmp = null;
48844
+ } else {
48845
+ // Inline function 'kotlin.collections.filter' call
48846
+ // Inline function 'kotlin.collections.filterTo' call
48847
+ var destination = ArrayList_init_$Create$_0();
48848
+ var _iterator__ex2g4s = playerAchievements.l();
48849
+ while (_iterator__ex2g4s.m()) {
48850
+ var element = _iterator__ex2g4s.n();
48851
+ // Inline function 'kotlin.math.absoluteValue' call
48852
+ var this_0 = element.oldRating - element.newRating;
48853
+ if (Math.abs(this_0) >= 80) {
48854
+ destination.j(element);
48855
+ }
48856
+ }
48857
+ tmp = destination;
48858
+ }
48859
+ var tmp1_elvis_lhs = tmp;
48860
+ var suspiciousRatingChange = tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs;
48861
+ // Inline function 'kotlin.collections.isNotEmpty' call
48862
+ if (!suspiciousRatingChange.r()) {
48863
+ logger.w('roundLifecycleMiddleware', 'Suspicious rating change: ' + toString(suspiciousRatingChange));
48864
+ }
48865
+ var tmp_0;
48866
+ if (playerAchievements == null) {
48867
+ tmp_0 = null;
48868
+ } else {
48869
+ // Inline function 'kotlin.collections.filter' call
48870
+ // Inline function 'kotlin.collections.filterTo' call
48871
+ var destination_0 = ArrayList_init_$Create$_0();
48872
+ var _iterator__ex2g4s_0 = playerAchievements.l();
48873
+ while (_iterator__ex2g4s_0.m()) {
48874
+ var element_0 = _iterator__ex2g4s_0.n();
48875
+ if (element_0.oldRating < 2000 && element_0.newRating > 2000) {
48876
+ destination_0.j(element_0);
48877
+ }
48878
+ }
48879
+ tmp_0 = destination_0;
48880
+ }
48881
+ var tmp3_elvis_lhs = tmp_0;
48882
+ var ratingChangeAboveLimit = tmp3_elvis_lhs == null ? emptyList() : tmp3_elvis_lhs;
48883
+ // Inline function 'kotlin.collections.isNotEmpty' call
48884
+ if (!ratingChangeAboveLimit.r()) {
48885
+ logger.w('roundLifecycleMiddleware', 'Rating change above limit: ' + toString(suspiciousRatingChange));
48886
+ }
48887
+ }
48837
48888
  function roundLifecycleMiddleware$$inlined$middlewareForActionType$1($scenePositionProvider, $logger) {
48838
48889
  this.y8x_1 = $scenePositionProvider;
48839
48890
  this.z8x_1 = $logger;
@@ -48953,105 +49004,60 @@
48953
49004
  tmp_3 = destination_2;
48954
49005
  }
48955
49006
  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
- }
49007
+ validateRatingChange(this.z8x_1, playerAchievements);
49008
+ var tmp_4 = store.dispatch;
49009
+ var tmp15_id = table_0.id;
49010
+ var tmp16_gameId = table_0.gameId;
49011
+ var tmp17_roundNumber = table_0.gameInfo.round.roundNumber;
49012
+ var tmp18_earnedBiggestPointPlayerId = sceneData.h76_1;
48980
49013
  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
49014
  if (gameWinners == null) {
49009
- tmp_7 = null;
49015
+ tmp_5 = null;
49010
49016
  } else {
49011
49017
  // Inline function 'kotlin.collections.toTypedArray' call
49012
- tmp_7 = copyToArray(gameWinners);
49018
+ tmp_5 = copyToArray(gameWinners);
49013
49019
  }
49014
- var tmp23_gameWinners = tmp_7;
49015
- var tmp_8;
49020
+ var tmp19_gameWinners = tmp_5;
49021
+ var tmp_6;
49016
49022
  if (isGameFinished) {
49017
49023
  // Inline function 'kotlin.collections.map' call
49018
- var this_3 = table_0.players;
49024
+ var this_2 = table_0.players;
49019
49025
  // 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);
49026
+ var destination_3 = ArrayList_init_$Create$(collectionSizeOrDefault(this_2, 10));
49027
+ var _iterator__ex2g4s_3 = this_2.l();
49028
+ while (_iterator__ex2g4s_3.m()) {
49029
+ var item_2 = _iterator__ex2g4s_3.n();
49030
+ var tmp$ret$23 = mapToGameAnalytics(item_2, table_0.gameDuration);
49031
+ destination_3.j(tmp$ret$23);
49026
49032
  }
49027
49033
  // Inline function 'kotlin.collections.toTypedArray' call
49028
- tmp_8 = copyToArray(destination_5);
49034
+ tmp_6 = copyToArray(destination_3);
49029
49035
  } else {
49030
- tmp_8 = null;
49036
+ tmp_6 = null;
49031
49037
  }
49032
- var tmp24_playersGameAnalytics = tmp_8;
49038
+ var tmp20_playersGameAnalytics = tmp_6;
49033
49039
  // Inline function 'kotlin.collections.map' call
49034
- var this_4 = table_0.players;
49040
+ var this_3 = table_0.players;
49035
49041
  // 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);
49042
+ var destination_4 = ArrayList_init_$Create$(collectionSizeOrDefault(this_3, 10));
49043
+ var _iterator__ex2g4s_4 = this_3.l();
49044
+ while (_iterator__ex2g4s_4.m()) {
49045
+ var item_3 = _iterator__ex2g4s_4.n();
49046
+ var tmp$ret$27 = mapToRoundAnalytics(item_3, table_0.gameDuration);
49047
+ destination_4.j(tmp$ret$27);
49042
49048
  }
49043
49049
  // Inline function 'kotlin.collections.toTypedArray' call
49044
- var tmp25_playersRoundAnalytics = copyToArray(destination_6);
49045
- var tmp26_gameHistory = table_0.gameHistory;
49046
- var tmp_9;
49050
+ var tmp21_playersRoundAnalytics = copyToArray(destination_4);
49051
+ var tmp22_gameHistory = table_0.gameHistory;
49052
+ var tmp_7;
49047
49053
  if (playerAchievements == null) {
49048
- tmp_9 = null;
49054
+ tmp_7 = null;
49049
49055
  } else {
49050
49056
  // Inline function 'kotlin.collections.toTypedArray' call
49051
- tmp_9 = copyToArray(playerAchievements);
49057
+ tmp_7 = copyToArray(playerAchievements);
49052
49058
  }
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));
49059
+ var tmp23_achievements = tmp_7;
49060
+ tmp_4(new RoundEndedAction(tmp15_id, tmp16_gameId, tmp17_roundNumber, tmp18_earnedBiggestPointPlayerId, gameLosers, tmp19_gameWinners, tmp20_playersGameAnalytics, tmp21_playersRoundAnalytics, tmp23_achievements, tmp22_gameHistory));
49055
49061
  }
49056
49062
  }
49057
49063
  }
@@ -53249,7 +53255,7 @@
53249
53255
  var tmp3_bribes = emptyList();
53250
53256
  var tmp4_gameInfo = roundFinishedGameInfoReducer(this, table);
53251
53257
  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);
53258
+ return table.copy(VOID, VOID, VOID, VOID, destination, VOID, tmp0_sceneInfo, tmp2_cardsOnTable, tmp3_bribes, VOID, VOID, tmp4_gameInfo, tmp5_gameHistory);
53253
53259
  };
53254
53260
  protoOf(TableLifecycleReducerImpl).x94 = function (table) {
53255
53261
  // Inline function 'kotlin.collections.map' call