raspberry_games_server_game_logic 1.8.426 → 1.8.428

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.
@@ -380,7 +380,7 @@
380
380
  function addFormatStructureForTime(structure) {
381
381
  this.v5k(structure);
382
382
  }
383
- initMetadataForInterface(AbstractWithDateTimeBuilder, 'AbstractWithDateTimeBuilder', VOID, VOID, [AbstractWithDateBuilder, AbstractWithTimeBuilder, WithDate, WithTime]);
383
+ initMetadataForInterface(AbstractWithDateTimeBuilder, 'AbstractWithDateTimeBuilder', VOID, VOID, [AbstractWithDateBuilder, AbstractWithTimeBuilder, WithTime, WithDate]);
384
384
  initMetadataForClass(Builder_0, 'Builder', VOID, VOID, [AbstractDateTimeFormatBuilder, AbstractWithDateTimeBuilder]);
385
385
  initMetadataForClass(LocalDateTimeFormat, 'LocalDateTimeFormat', VOID, AbstractDateTimeFormat);
386
386
  function set_fractionOfSecond(value) {
@@ -402,7 +402,7 @@
402
402
  initMetadataForClass(AppEnvironmentValue, 'AppEnvironmentValue', VOID, Enum);
403
403
  //endregion
404
404
  function GameEngineConfig() {
405
- this.version = '1.8.426';
405
+ this.version = '1.8.428';
406
406
  }
407
407
  protoOf(GameEngineConfig).a3w = function () {
408
408
  return this.version;
@@ -1266,8 +1266,8 @@
1266
1266
  initMetadataForClass(NotCurrentPlayerCheck, 'NotCurrentPlayerCheck');
1267
1267
  initMetadataForClass(consumeFromClientActionsMiddleware$$inlined$middlewareForActionType$1, VOID, VOID, VOID, [Middleware]);
1268
1268
  initMetadataForInterface(IgnoreLoggerAction, 'IgnoreLoggerAction', VOID, VOID, [Action]);
1269
- initMetadataForLambda(botChatPutCardMiddleware$o$handle$slambda, CoroutineImpl, VOID, [1]);
1270
- initMetadataForClass(botChatPutCardMiddleware$$inlined$middlewareForActionType$1, VOID, VOID, VOID, [Middleware]);
1269
+ initMetadataForLambda(botChatMiddleware$o$handle$slambda, CoroutineImpl, VOID, [1]);
1270
+ initMetadataForClass(botChatMiddleware$$inlined$middlewareForActionType$1, VOID, VOID, VOID, [Middleware]);
1271
1271
  initMetadataForLambda(handleRandomMessage$slambda, CoroutineImpl, VOID, [1]);
1272
1272
  initMetadataForLambda(botLogicMiddleware$o$handle$slambda, CoroutineImpl, VOID, [1]);
1273
1273
  initMetadataForClass(botLogicMiddleware$$inlined$middlewareForActionType$1, VOID, VOID, VOID, [Middleware]);
@@ -45636,116 +45636,83 @@
45636
45636
  return $super === VOID ? this.d8z(ratingList, playersMode, pointsMode, ratingConfig) : $super.d8z.call(this, ratingList, playersMode, pointsMode, ratingConfig);
45637
45637
  };
45638
45638
  protoOf(UserRatingInteractor).f8z = function (leavingPlayer, allPlayers, playersMode, pointsMode, ratingConfig) {
45639
- // Inline function 'kotlin.collections.map' call
45640
- // Inline function 'kotlin.collections.mapTo' call
45641
- var destination = ArrayList_init_$Create$(collectionSizeOrDefault(allPlayers, 10));
45639
+ var maxScore = pointsMode.value;
45640
+ // Inline function 'kotlin.collections.filter' call
45641
+ // Inline function 'kotlin.collections.filterTo' call
45642
+ var destination = ArrayList_init_$Create$_0();
45642
45643
  var _iterator__ex2g4s = allPlayers.l();
45643
45644
  while (_iterator__ex2g4s.m()) {
45644
- var item = _iterator__ex2g4s.n();
45645
- var isLeavingPlayer = item.playerId === leavingPlayer.playerId;
45646
- var tmp;
45647
- if (item.j6v_1.isBot) {
45648
- tmp = AgentType_BOT_NATIVE_getInstance();
45649
- } else if (isLeavingPlayer) {
45650
- tmp = AgentType_BOT_REPLACEMENT_getInstance();
45651
- } else {
45652
- tmp = AgentType_HUMAN_getInstance();
45645
+ var element = _iterator__ex2g4s.n();
45646
+ if (!(element.playerId === leavingPlayer.playerId)) {
45647
+ destination.j(element);
45653
45648
  }
45654
- var agentType = tmp;
45655
- var currentPoints = item.o6v_1.e71_1;
45656
- // Inline function 'kotlin.collections.maxOf' call
45657
- var iterator = allPlayers.l();
45658
- if (!iterator.m())
45659
- throw NoSuchElementException_init_$Create$_0();
45660
- var maxValue = iterator.n().o6v_1.e71_1;
45661
- while (iterator.m()) {
45662
- var v = iterator.n().o6v_1.e71_1;
45663
- if (compareTo(maxValue, v) < 0) {
45664
- maxValue = v;
45665
- }
45649
+ }
45650
+ // Inline function 'kotlin.collections.sortedByDescending' call
45651
+ // Inline function 'kotlin.comparisons.compareByDescending' call
45652
+ var tmp = UserRatingInteractor$calculatePlayerLeftRating$lambda;
45653
+ var tmp$ret$3 = new sam$kotlin_Comparator$0_9(tmp);
45654
+ var nonLeavingPlayers = sortedWith(destination, tmp$ret$3);
45655
+ var tmp_0;
45656
+ if (playersMode.q2_1 === 3) {
45657
+ // Inline function 'kotlin.collections.map' call
45658
+ var this_0 = take(nonLeavingPlayers, 2);
45659
+ // Inline function 'kotlin.collections.mapTo' call
45660
+ var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
45661
+ var _iterator__ex2g4s_0 = this_0.l();
45662
+ while (_iterator__ex2g4s_0.m()) {
45663
+ var item = _iterator__ex2g4s_0.n();
45664
+ var tmp$ret$5 = item.playerId;
45665
+ destination_0.j(tmp$ret$5);
45666
45666
  }
45667
- var maxCurrentPoints = maxValue;
45668
- var tmp_0;
45669
- if (playersMode.q2_1 === 3) {
45670
- var tmp_1;
45671
- if (isLeavingPlayer) {
45672
- tmp_1 = false;
45673
- } else {
45674
- // Inline function 'kotlin.collections.sortedByDescending' call
45675
- // Inline function 'kotlin.comparisons.compareByDescending' call
45676
- var tmp_2 = UserRatingInteractor$calculatePlayerLeftRating$lambda;
45677
- var tmp$ret$3 = new sam$kotlin_Comparator$0_9(tmp_2);
45678
- var sortedPlayers = sortedWith(allPlayers, tmp$ret$3);
45679
- var tmp0 = take(sortedPlayers, 2);
45680
- var tmp$ret$5;
45681
- $l$block_0: {
45682
- // Inline function 'kotlin.collections.any' call
45683
- var tmp_3;
45684
- if (isInterface(tmp0, Collection)) {
45685
- tmp_3 = tmp0.r();
45686
- } else {
45687
- tmp_3 = false;
45688
- }
45689
- if (tmp_3) {
45690
- tmp$ret$5 = false;
45691
- break $l$block_0;
45692
- }
45693
- var _iterator__ex2g4s_0 = tmp0.l();
45694
- while (_iterator__ex2g4s_0.m()) {
45695
- var element = _iterator__ex2g4s_0.n();
45696
- if (element.playerId === item.playerId) {
45697
- tmp$ret$5 = true;
45698
- break $l$block_0;
45699
- }
45700
- }
45701
- tmp$ret$5 = false;
45702
- }
45703
- tmp_1 = tmp$ret$5;
45704
- }
45705
- tmp_0 = tmp_1;
45667
+ tmp_0 = toSet(destination_0);
45668
+ } else {
45669
+ var tmp_1;
45670
+ // Inline function 'kotlin.collections.isNotEmpty' call
45671
+ if (!nonLeavingPlayers.r()) {
45672
+ tmp_1 = setOf(first(nonLeavingPlayers).playerId);
45706
45673
  } else {
45707
- tmp_0 = (!isLeavingPlayer && currentPoints === maxCurrentPoints && maxCurrentPoints > 0);
45674
+ tmp_1 = emptySet();
45708
45675
  }
45709
- var isWinner = tmp_0;
45710
- var tmp_4;
45711
- if (isLeavingPlayer) {
45712
- tmp_4 = 0;
45676
+ tmp_0 = tmp_1;
45677
+ }
45678
+ var winnerIds = tmp_0;
45679
+ // Inline function 'kotlin.collections.map' call
45680
+ // Inline function 'kotlin.collections.mapTo' call
45681
+ var destination_1 = ArrayList_init_$Create$(collectionSizeOrDefault(allPlayers, 10));
45682
+ var _iterator__ex2g4s_1 = allPlayers.l();
45683
+ while (_iterator__ex2g4s_1.m()) {
45684
+ var item_0 = _iterator__ex2g4s_1.n();
45685
+ var isLeavingPlayer = item_0.playerId === leavingPlayer.playerId;
45686
+ var isWinner = winnerIds.u1(item_0.playerId);
45687
+ var tmp_2;
45688
+ if (item_0.j6v_1.isBot) {
45689
+ tmp_2 = AgentType_BOT_NATIVE_getInstance();
45690
+ } else if (isLeavingPlayer) {
45691
+ tmp_2 = AgentType_BOT_REPLACEMENT_getInstance();
45713
45692
  } else {
45714
- var tmp_5;
45715
- if (maxCurrentPoints > 0) {
45716
- tmp_5 = pointsMode.value / maxCurrentPoints;
45717
- } else {
45718
- tmp_5 = 1.0;
45719
- }
45720
- var scaleFactor = tmp_5;
45721
- var tmp_6;
45722
- if (currentPoints === maxCurrentPoints) {
45723
- tmp_6 = pointsMode.value;
45724
- } else {
45725
- tmp_6 = numberToInt(currentPoints * scaleFactor);
45726
- }
45727
- tmp_4 = tmp_6;
45693
+ tmp_2 = AgentType_HUMAN_getInstance();
45728
45694
  }
45729
- var finalGamePoints = tmp_4;
45730
- var tmp$ret$7 = mapToRatingInput(item, isWinner, agentType, finalGamePoints);
45731
- destination.j(tmp$ret$7);
45695
+ var agentType = tmp_2;
45696
+ var finalGamePoints = isLeavingPlayer ? 0 : isWinner ? maxScore : item_0.o6v_1.e71_1;
45697
+ var tmp$ret$9 = mapToRatingInput(item_0, isWinner, agentType, finalGamePoints);
45698
+ destination_1.j(tmp$ret$9);
45732
45699
  }
45733
- var ratingInputs = destination;
45700
+ var ratingInputs = destination_1;
45734
45701
  var results = this.d8z(ratingInputs, playersMode, pointsMode, ratingConfig);
45735
- var tmp$ret$11;
45736
- $l$block_1: {
45702
+ var tmp$ret$13;
45703
+ $l$block: {
45737
45704
  // Inline function 'kotlin.collections.firstOrNull' call
45738
- var _iterator__ex2g4s_1 = results.l();
45739
- while (_iterator__ex2g4s_1.m()) {
45740
- var element_0 = _iterator__ex2g4s_1.n();
45705
+ var _iterator__ex2g4s_2 = results.l();
45706
+ while (_iterator__ex2g4s_2.m()) {
45707
+ var element_0 = _iterator__ex2g4s_2.n();
45741
45708
  if (element_0.u76_1 === leavingPlayer.playerId) {
45742
- tmp$ret$11 = element_0;
45743
- break $l$block_1;
45709
+ tmp$ret$13 = element_0;
45710
+ break $l$block;
45744
45711
  }
45745
45712
  }
45746
- tmp$ret$11 = null;
45713
+ tmp$ret$13 = null;
45747
45714
  }
45748
- return tmp$ret$11;
45715
+ return tmp$ret$13;
45749
45716
  };
45750
45717
  protoOf(UserRatingInteractor).g8z = function (leavingPlayer, allPlayers, playersMode, pointsMode, ratingConfig, $super) {
45751
45718
  ratingConfig = ratingConfig === VOID ? new RatingConfig() : ratingConfig;
@@ -51837,7 +51804,7 @@
51837
51804
  // Inline function 'kotlin.let' call
51838
51805
  var tmp0_asyncProvider = _get_asyncProvider__jbpyhw_0(this);
51839
51806
  var tmp1_conversationCache = _get_conversationCache__95j15a(this);
51840
- this_0.j(botChatPutCardMiddleware(tmp3_safe_receiver, tmp1_conversationCache, tmp0_asyncProvider, isEnableBotForPlayer));
51807
+ this_0.j(botChatMiddleware(tmp3_safe_receiver, tmp1_conversationCache, tmp0_asyncProvider, isEnableBotForPlayer));
51841
51808
  }
51842
51809
  }
51843
51810
  return this_0.e3();
@@ -52741,9 +52708,9 @@
52741
52708
  return Unit_instance;
52742
52709
  };
52743
52710
  }
52744
- function botChatPutCardMiddleware(botChatInteractor, conversationCache, asyncProvider, isEnableBotChatForPlayer) {
52711
+ function botChatMiddleware(botChatInteractor, conversationCache, asyncProvider, isEnableBotChatForPlayer) {
52745
52712
  // Inline function 'com.logic.redux.store.definitions.middlewareForActionType' call
52746
- return new botChatPutCardMiddleware$$inlined$middlewareForActionType$1(conversationCache, botChatInteractor, asyncProvider, isEnableBotChatForPlayer);
52713
+ return new botChatMiddleware$$inlined$middlewareForActionType$1(conversationCache, botChatInteractor, asyncProvider, isEnableBotChatForPlayer);
52747
52714
  }
52748
52715
  function shouldGenerateRandomMessage() {
52749
52716
  return false;
@@ -52751,7 +52718,7 @@
52751
52718
  function handleRandomMessage(store, playerId, botChatInteractor, asyncProvider, isEnableBotChatForPlayer, triggerReason) {
52752
52719
  asyncProvider.j6c(VOID, handleRandomMessage$slambda_0(store, botChatInteractor, playerId, triggerReason, isEnableBotChatForPlayer, null));
52753
52720
  }
52754
- function botChatPutCardMiddleware$o$handle$slambda($botChatInteractor, $store, $messageText, $action, $isEnableBotChatForPlayer, resultContinuation) {
52721
+ function botChatMiddleware$o$handle$slambda($botChatInteractor, $store, $messageText, $action, $isEnableBotChatForPlayer, resultContinuation) {
52755
52722
  this.v9a_1 = $botChatInteractor;
52756
52723
  this.w9a_1 = $store;
52757
52724
  this.x9a_1 = $messageText;
@@ -52759,16 +52726,16 @@
52759
52726
  this.z9a_1 = $isEnableBotChatForPlayer;
52760
52727
  CoroutineImpl.call(this, resultContinuation);
52761
52728
  }
52762
- protoOf(botChatPutCardMiddleware$o$handle$slambda).b2d = function ($this$launchDefault, $completion) {
52729
+ protoOf(botChatMiddleware$o$handle$slambda).b2d = function ($this$launchDefault, $completion) {
52763
52730
  var tmp = this.c2d($this$launchDefault, $completion);
52764
52731
  tmp.u8_1 = Unit_instance;
52765
52732
  tmp.v8_1 = null;
52766
52733
  return tmp.a9();
52767
52734
  };
52768
- protoOf(botChatPutCardMiddleware$o$handle$slambda).i9 = function (p1, $completion) {
52735
+ protoOf(botChatMiddleware$o$handle$slambda).i9 = function (p1, $completion) {
52769
52736
  return this.b2d((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
52770
52737
  };
52771
- protoOf(botChatPutCardMiddleware$o$handle$slambda).a9 = function () {
52738
+ protoOf(botChatMiddleware$o$handle$slambda).a9 = function () {
52772
52739
  var suspendResult = this.u8_1;
52773
52740
  $sm: do
52774
52741
  try {
@@ -52813,29 +52780,29 @@
52813
52780
  }
52814
52781
  while (true);
52815
52782
  };
52816
- protoOf(botChatPutCardMiddleware$o$handle$slambda).c2d = function ($this$launchDefault, completion) {
52817
- var i = new botChatPutCardMiddleware$o$handle$slambda(this.v9a_1, this.w9a_1, this.x9a_1, this.y9a_1, this.z9a_1, completion);
52783
+ protoOf(botChatMiddleware$o$handle$slambda).c2d = function ($this$launchDefault, completion) {
52784
+ var i = new botChatMiddleware$o$handle$slambda(this.v9a_1, this.w9a_1, this.x9a_1, this.y9a_1, this.z9a_1, completion);
52818
52785
  i.a9b_1 = $this$launchDefault;
52819
52786
  return i;
52820
52787
  };
52821
- function botChatPutCardMiddleware$o$handle$slambda_0($botChatInteractor, $store, $messageText, $action, $isEnableBotChatForPlayer, resultContinuation) {
52822
- var i = new botChatPutCardMiddleware$o$handle$slambda($botChatInteractor, $store, $messageText, $action, $isEnableBotChatForPlayer, resultContinuation);
52788
+ function botChatMiddleware$o$handle$slambda_0($botChatInteractor, $store, $messageText, $action, $isEnableBotChatForPlayer, resultContinuation) {
52789
+ var i = new botChatMiddleware$o$handle$slambda($botChatInteractor, $store, $messageText, $action, $isEnableBotChatForPlayer, resultContinuation);
52823
52790
  var l = function ($this$launchDefault, $completion) {
52824
52791
  return i.b2d($this$launchDefault, $completion);
52825
52792
  };
52826
52793
  l.$arity = 1;
52827
52794
  return l;
52828
52795
  }
52829
- function botChatPutCardMiddleware$$inlined$middlewareForActionType$1($conversationCache, $botChatInteractor, $asyncProvider, $isEnableBotChatForPlayer) {
52796
+ function botChatMiddleware$$inlined$middlewareForActionType$1($conversationCache, $botChatInteractor, $asyncProvider, $isEnableBotChatForPlayer) {
52830
52797
  this.b9b_1 = $conversationCache;
52831
52798
  this.c9b_1 = $botChatInteractor;
52832
52799
  this.d9b_1 = $asyncProvider;
52833
52800
  this.e9b_1 = $isEnableBotChatForPlayer;
52834
52801
  }
52835
- protoOf(botChatPutCardMiddleware$$inlined$middlewareForActionType$1).g6g = function (action) {
52802
+ protoOf(botChatMiddleware$$inlined$middlewareForActionType$1).g6g = function (action) {
52836
52803
  return action instanceof MechanicAction;
52837
52804
  };
52838
- protoOf(botChatPutCardMiddleware$$inlined$middlewareForActionType$1).v6h = function (store, next, action) {
52805
+ protoOf(botChatMiddleware$$inlined$middlewareForActionType$1).v6h = function (store, next, action) {
52839
52806
  var action_0 = action instanceof MechanicAction ? action : THROW_CCE();
52840
52807
  next(action_0);
52841
52808
  if (action_0 instanceof MessageMechanicAction) {
@@ -52882,7 +52849,7 @@
52882
52849
  }
52883
52850
  var messageText = tmp_0;
52884
52851
  if (!(messageText == null)) {
52885
- this.d9b_1.j6c(VOID, botChatPutCardMiddleware$o$handle$slambda_0(this.c9b_1, store, messageText, action_0, this.e9b_1, null));
52852
+ this.d9b_1.j6c(VOID, botChatMiddleware$o$handle$slambda_0(this.c9b_1, store, messageText, action_0, this.e9b_1, null));
52886
52853
  }
52887
52854
  }
52888
52855
  }
@@ -52890,7 +52857,7 @@
52890
52857
  }
52891
52858
  }
52892
52859
  };
52893
- protoOf(botChatPutCardMiddleware$$inlined$middlewareForActionType$1).f6g = function (store, next, action) {
52860
+ protoOf(botChatMiddleware$$inlined$middlewareForActionType$1).f6g = function (store, next, action) {
52894
52861
  return this.v6h(store, next, action);
52895
52862
  };
52896
52863
  function handleRandomMessage$slambda($store, $botChatInteractor, $playerId, $triggerReason, $isEnableBotChatForPlayer, resultContinuation) {