raspberry_games_engine_helpers 1.8.323 → 1.8.325
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.
package/Logic_Debertz-engine.js
CHANGED
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
var Companion_getInstance_0 = kotlin_io_raspberryapps_game_engine_core.$_$.s1;
|
|
145
145
|
var PolymorphicSerializer_init_$Create$ = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.b;
|
|
146
146
|
var Companion_getInstance_1 = kotlin_io_raspberryapps_game_engine_core.$_$.r1;
|
|
147
|
-
var RestartGameReason_getInstance = kotlin_io_raspberryapps_game_engine_core.$_$.
|
|
147
|
+
var RestartGameReason_getInstance = kotlin_io_raspberryapps_game_engine_core.$_$.u1;
|
|
148
148
|
var ObjectSerializer_init_$Create$ = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.a;
|
|
149
149
|
var Companion_getInstance_2 = kotlin_io_raspberryapps_game_engine_core.$_$.k1;
|
|
150
150
|
var mapToDto = kotlin_io_raspberryapps_game_engine_core.$_$.o;
|
|
@@ -218,6 +218,7 @@
|
|
|
218
218
|
var listOfNotNull_0 = kotlin_kotlin.$_$.t6;
|
|
219
219
|
var BufferedAction = kotlin_io_raspberryapps_game_engine_core.$_$.v;
|
|
220
220
|
var IgnoreBufferForAction = kotlin_io_raspberryapps_game_engine_core.$_$.w;
|
|
221
|
+
var ProcessingReason_getInstance = kotlin_io_raspberryapps_game_engine_core.$_$.t1;
|
|
221
222
|
var ReleaseBufferTriggerAction = kotlin_io_raspberryapps_game_engine_core.$_$.x;
|
|
222
223
|
var isArray = kotlin_kotlin.$_$.z8;
|
|
223
224
|
var mapOfObject = kotlin_io_raspberryapps_game_engine_core.$_$.c1;
|
|
@@ -754,14 +755,14 @@
|
|
|
754
755
|
initMetadataForClass(ClearAction, 'ClearAction', ClearAction, VOID, [Action, NotValidateIfGameFinishing, NotValidateIfGameFinished]);
|
|
755
756
|
initMetadataForClass(FromClientActionPayloadProvider, 'FromClientActionPayloadProvider');
|
|
756
757
|
initMetadataForClass(FromClientAction, 'FromClientAction', VOID, VOID, [Action]);
|
|
757
|
-
initMetadataForClass(PartnerSelectedFromClientAction, 'PartnerSelectedFromClientAction', VOID, FromClientAction, [FromClientAction,
|
|
758
|
-
initMetadataForClass(PlayerReadyFromClientAction, 'PlayerReadyFromClientAction', VOID, FromClientAction, [FromClientAction,
|
|
759
|
-
initMetadataForClass(SuitChoiceFromClientAction, 'SuitChoiceFromClientAction', VOID, FromClientAction, [FromClientAction,
|
|
760
|
-
initMetadataForClass(CombinationChoiceFromClientAction, 'CombinationChoiceFromClientAction', VOID, FromClientAction, [FromClientAction,
|
|
761
|
-
initMetadataForClass(CardFromClientAction, 'CardFromClientAction', VOID, FromClientAction, [FromClientAction,
|
|
758
|
+
initMetadataForClass(PartnerSelectedFromClientAction, 'PartnerSelectedFromClientAction', VOID, FromClientAction, [FromClientAction, Action, PlayerIdContract]);
|
|
759
|
+
initMetadataForClass(PlayerReadyFromClientAction, 'PlayerReadyFromClientAction', VOID, FromClientAction, [FromClientAction, Action, PlayerIdContract]);
|
|
760
|
+
initMetadataForClass(SuitChoiceFromClientAction, 'SuitChoiceFromClientAction', VOID, FromClientAction, [FromClientAction, Action, PlayerIdContract]);
|
|
761
|
+
initMetadataForClass(CombinationChoiceFromClientAction, 'CombinationChoiceFromClientAction', VOID, FromClientAction, [FromClientAction, Action, PlayerIdContract]);
|
|
762
|
+
initMetadataForClass(CardFromClientAction, 'CardFromClientAction', VOID, FromClientAction, [FromClientAction, Action, PlayerIdContract]);
|
|
762
763
|
initMetadataForClass(MessageFromClientAction, 'MessageFromClientAction', VOID, FromClientAction);
|
|
763
764
|
initMetadataForClass(ExitFromClientAction, 'ExitFromClientAction', VOID, FromClientAction);
|
|
764
|
-
initMetadataForClass(RequestedCardDecksFromClientAction, 'RequestedCardDecksFromClientAction', VOID, FromClientAction, [FromClientAction,
|
|
765
|
+
initMetadataForClass(RequestedCardDecksFromClientAction, 'RequestedCardDecksFromClientAction', VOID, FromClientAction, [FromClientAction, Action, PlayerIdContract]);
|
|
765
766
|
initMetadataForCompanion(Companion_148);
|
|
766
767
|
initMetadataForClass(ActionDeliveryPayload, 'ActionDeliveryPayload');
|
|
767
768
|
initMetadataForCompanion(Companion_149, VOID, [SerializerFactory]);
|
|
@@ -830,11 +831,11 @@
|
|
|
830
831
|
return tmp$ret$1;
|
|
831
832
|
}
|
|
832
833
|
initMetadataForInterface(PlayerTurnIdAnswerAction, 'PlayerTurnIdAnswerAction', VOID, VOID, [Action, ReleaseBufferTriggerAction, PlayerIdContract]);
|
|
833
|
-
initMetadataForClass(SceneMechanicAction, 'SceneMechanicAction', VOID, MechanicAction, [MechanicAction, NavigationMechanicAction,
|
|
834
|
+
initMetadataForClass(SceneMechanicAction, 'SceneMechanicAction', VOID, MechanicAction, [MechanicAction, NavigationMechanicAction, Action, ReleaseBufferTriggerAction, PlayerTurnIdAnswerAction, NotValidateIfGameFinishing, NotValidateIfGameFinished]);
|
|
834
835
|
initMetadataForClass(PlayerConnectionChangedMechanicAction, 'PlayerConnectionChangedMechanicAction', VOID, MechanicAction, [MechanicAction, NotValidateIfGameFinishing, NotValidateIfGameFinished]);
|
|
835
836
|
initMetadataForClass(ContinueGameMechanicAction, 'ContinueGameMechanicAction', VOID, MechanicAction, [MechanicAction, FirstMechanicAction, NotValidateIfGameFinishing, NotValidateIfGameFinished]);
|
|
836
837
|
initMetadataForClass(RestartGameMechanicAction, 'RestartGameMechanicAction', VOID, MechanicAction, [MechanicAction, BufferedAction]);
|
|
837
|
-
initMetadataForClass(SceneActMechanicAction, 'SceneActMechanicAction', VOID, MechanicAction, [MechanicAction, NavigationMechanicAction,
|
|
838
|
+
initMetadataForClass(SceneActMechanicAction, 'SceneActMechanicAction', VOID, MechanicAction, [MechanicAction, NavigationMechanicAction, Action, ReleaseBufferTriggerAction]);
|
|
838
839
|
initMetadataForClass(TeamsDataMechanicAction, 'TeamsDataMechanicAction', VOID, MechanicAction, [MechanicAction, Action, BufferedAction]);
|
|
839
840
|
initMetadataForClass(PlayerReadyMechanicAction, 'PlayerReadyMechanicAction', VOID, MechanicAction, [MechanicAction, Action, PlayerTurnIdAnswerAction]);
|
|
840
841
|
initMetadataForClass(SuitChoiceMechanicAction, 'SuitChoiceMechanicAction', VOID, MechanicAction, [MechanicAction, Action, PlayerTurnIdAnswerAction, ReleaseBufferTriggerAction]);
|
|
@@ -25753,8 +25754,8 @@
|
|
|
25753
25754
|
tmp0_serialDesc.iv('gameId', false);
|
|
25754
25755
|
tmp0_serialDesc.iv('createdAt', false);
|
|
25755
25756
|
tmp0_serialDesc.iv('round', false);
|
|
25756
|
-
tmp0_serialDesc.iv('gameWinners',
|
|
25757
|
-
tmp0_serialDesc.iv('metadata',
|
|
25757
|
+
tmp0_serialDesc.iv('gameWinners', false);
|
|
25758
|
+
tmp0_serialDesc.iv('metadata', false);
|
|
25758
25759
|
this.y3o_1 = tmp0_serialDesc;
|
|
25759
25760
|
}
|
|
25760
25761
|
protoOf($serializer_88).z3o = function (encoder, value) {
|
|
@@ -25764,12 +25765,8 @@
|
|
|
25764
25765
|
tmp1_output.hp(tmp0_desc, 0, value.j33_1);
|
|
25765
25766
|
tmp1_output.hp(tmp0_desc, 1, value.k33_1);
|
|
25766
25767
|
tmp1_output.jp(tmp0_desc, 2, $serializer_getInstance_94(), value.l33_1);
|
|
25767
|
-
|
|
25768
|
-
|
|
25769
|
-
}
|
|
25770
|
-
if (tmp1_output.pp(tmp0_desc, 4) ? true : !(value.n33_1 == null)) {
|
|
25771
|
-
tmp1_output.lp(tmp0_desc, 4, $serializer_getInstance_92(), value.n33_1);
|
|
25772
|
-
}
|
|
25768
|
+
tmp1_output.lp(tmp0_desc, 3, tmp2_cached[3], value.m33_1);
|
|
25769
|
+
tmp1_output.lp(tmp0_desc, 4, $serializer_getInstance_92(), value.n33_1);
|
|
25773
25770
|
tmp1_output.tn(tmp0_desc);
|
|
25774
25771
|
};
|
|
25775
25772
|
protoOf($serializer_88).kk = function (encoder, value) {
|
|
@@ -25849,20 +25846,14 @@
|
|
|
25849
25846
|
return $serializer_instance_88;
|
|
25850
25847
|
}
|
|
25851
25848
|
function GameHistoryDto_init_$Init$(seen0, gameId, createdAt, round, gameWinners, metadata, serializationConstructorMarker, $this) {
|
|
25852
|
-
if (!(
|
|
25853
|
-
throwMissingFieldException(seen0,
|
|
25849
|
+
if (!(31 === (31 & seen0))) {
|
|
25850
|
+
throwMissingFieldException(seen0, 31, $serializer_getInstance_91().y3o_1);
|
|
25854
25851
|
}
|
|
25855
25852
|
$this.j33_1 = gameId;
|
|
25856
25853
|
$this.k33_1 = createdAt;
|
|
25857
25854
|
$this.l33_1 = round;
|
|
25858
|
-
|
|
25859
|
-
|
|
25860
|
-
else
|
|
25861
|
-
$this.m33_1 = gameWinners;
|
|
25862
|
-
if (0 === (seen0 & 16))
|
|
25863
|
-
$this.n33_1 = null;
|
|
25864
|
-
else
|
|
25865
|
-
$this.n33_1 = metadata;
|
|
25855
|
+
$this.m33_1 = gameWinners;
|
|
25856
|
+
$this.n33_1 = metadata;
|
|
25866
25857
|
return $this;
|
|
25867
25858
|
}
|
|
25868
25859
|
function GameHistoryDto_init_$Create$(seen0, gameId, createdAt, round, gameWinners, metadata, serializationConstructorMarker) {
|
|
@@ -25870,8 +25861,6 @@
|
|
|
25870
25861
|
}
|
|
25871
25862
|
function GameHistoryDto(gameId, createdAt, round, gameWinners, metadata) {
|
|
25872
25863
|
Companion_getInstance_121();
|
|
25873
|
-
gameWinners = gameWinners === VOID ? null : gameWinners;
|
|
25874
|
-
metadata = metadata === VOID ? null : metadata;
|
|
25875
25864
|
this.j33_1 = gameId;
|
|
25876
25865
|
this.k33_1 = createdAt;
|
|
25877
25866
|
this.l33_1 = round;
|
|
@@ -33759,16 +33748,21 @@
|
|
|
33759
33748
|
var tmp6_isRoundHistorySaved = tmp;
|
|
33760
33749
|
return new FinishingGameMechanicAction(reason, isGameFinished, transition, tmp4_sessionAnalytics, tmp5_gameHistory, tmp6_isRoundHistorySaved);
|
|
33761
33750
|
};
|
|
33762
|
-
protoOf(Companion_150).
|
|
33751
|
+
protoOf(Companion_150).fromTableWithAnalytics = function (reason, isGameFinished, table, transition, $super) {
|
|
33763
33752
|
transition = transition === VOID ? null : transition;
|
|
33764
33753
|
return this.r3w(reason, isGameFinished, table, transition);
|
|
33765
33754
|
};
|
|
33755
|
+
protoOf(Companion_150).fromTable = function (table) {
|
|
33756
|
+
var tmp2_reason = ProcessingReason_getInstance();
|
|
33757
|
+
var tmp1_elvis_lhs = table == null ? null : table.isGameFinished;
|
|
33758
|
+
var tmp3_isGameFinished = tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs;
|
|
33759
|
+
return new FinishingGameMechanicAction(tmp2_reason, tmp3_isGameFinished, null, null, null, true);
|
|
33760
|
+
};
|
|
33766
33761
|
var Companion_instance_154;
|
|
33767
33762
|
function Companion_getInstance_157() {
|
|
33768
33763
|
return Companion_instance_154;
|
|
33769
33764
|
}
|
|
33770
33765
|
function FinishingGameMechanicAction(reason, isGameFinished, transition, sessionAnalytics, gameHistory, isRoundHistorySaved, aid) {
|
|
33771
|
-
transition = transition === VOID ? null : transition;
|
|
33772
33766
|
sessionAnalytics = sessionAnalytics === VOID ? null : sessionAnalytics;
|
|
33773
33767
|
gameHistory = gameHistory === VOID ? null : gameHistory;
|
|
33774
33768
|
isRoundHistorySaved = isRoundHistorySaved === VOID ? true : isRoundHistorySaved;
|
|
@@ -34873,7 +34867,7 @@
|
|
|
34873
34867
|
}
|
|
34874
34868
|
function GameHelper() {
|
|
34875
34869
|
}
|
|
34876
|
-
function
|
|
34870
|
+
function prepareFilterObjectInternal($this, map) {
|
|
34877
34871
|
var jsObject = {};
|
|
34878
34872
|
var tmp = map.d2('players');
|
|
34879
34873
|
var tmp0_safe_receiver = (tmp == null ? true : isArray(tmp)) ? tmp : null;
|
|
@@ -34890,7 +34884,7 @@
|
|
|
34890
34884
|
while (inductionVariable < last) {
|
|
34891
34885
|
var element = tmp0_safe_receiver[inductionVariable];
|
|
34892
34886
|
inductionVariable = inductionVariable + 1 | 0;
|
|
34893
|
-
// Inline function 'GameHelperImpl.
|
|
34887
|
+
// Inline function 'GameHelperImpl.prepareFilterObjectInternal.<anonymous>' call
|
|
34894
34888
|
validatePlayers($this, element);
|
|
34895
34889
|
}
|
|
34896
34890
|
tmp_0 = tmp0_safe_receiver;
|
|
@@ -34903,7 +34897,7 @@
|
|
|
34903
34897
|
// Inline function 'kotlin.takeIf' call
|
|
34904
34898
|
// Inline function 'kotlin.contracts.contract' call
|
|
34905
34899
|
var tmp_2;
|
|
34906
|
-
// Inline function 'GameHelperImpl.
|
|
34900
|
+
// Inline function 'GameHelperImpl.prepareFilterObjectInternal.<anonymous>' call
|
|
34907
34901
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
34908
34902
|
// Inline function 'kotlin.collections.isEmpty' call
|
|
34909
34903
|
if (!(tmp1_safe_receiver.length === 0)) {
|
|
@@ -34929,7 +34923,7 @@
|
|
|
34929
34923
|
while (inductionVariable_0 < last_0) {
|
|
34930
34924
|
var element_0 = tmp2_safe_receiver[inductionVariable_0];
|
|
34931
34925
|
inductionVariable_0 = inductionVariable_0 + 1 | 0;
|
|
34932
|
-
// Inline function 'GameHelperImpl.
|
|
34926
|
+
// Inline function 'GameHelperImpl.prepareFilterObjectInternal.<anonymous>' call
|
|
34933
34927
|
validatePoints($this, element_0);
|
|
34934
34928
|
}
|
|
34935
34929
|
tmp_4 = tmp2_safe_receiver;
|
|
@@ -34942,7 +34936,7 @@
|
|
|
34942
34936
|
// Inline function 'kotlin.takeIf' call
|
|
34943
34937
|
// Inline function 'kotlin.contracts.contract' call
|
|
34944
34938
|
var tmp_6;
|
|
34945
|
-
// Inline function 'GameHelperImpl.
|
|
34939
|
+
// Inline function 'GameHelperImpl.prepareFilterObjectInternal.<anonymous>' call
|
|
34946
34940
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
34947
34941
|
// Inline function 'kotlin.collections.isEmpty' call
|
|
34948
34942
|
if (!(tmp3_safe_receiver.length === 0)) {
|
|
@@ -34968,7 +34962,7 @@
|
|
|
34968
34962
|
while (inductionVariable_1 < last_1) {
|
|
34969
34963
|
var element_1 = tmp4_safe_receiver[inductionVariable_1];
|
|
34970
34964
|
inductionVariable_1 = inductionVariable_1 + 1 | 0;
|
|
34971
|
-
// Inline function 'GameHelperImpl.
|
|
34965
|
+
// Inline function 'GameHelperImpl.prepareFilterObjectInternal.<anonymous>' call
|
|
34972
34966
|
validateTimeoutTime($this, element_1);
|
|
34973
34967
|
}
|
|
34974
34968
|
tmp_8 = tmp4_safe_receiver;
|
|
@@ -34981,7 +34975,7 @@
|
|
|
34981
34975
|
// Inline function 'kotlin.takeIf' call
|
|
34982
34976
|
// Inline function 'kotlin.contracts.contract' call
|
|
34983
34977
|
var tmp_10;
|
|
34984
|
-
// Inline function 'GameHelperImpl.
|
|
34978
|
+
// Inline function 'GameHelperImpl.prepareFilterObjectInternal.<anonymous>' call
|
|
34985
34979
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
34986
34980
|
// Inline function 'kotlin.collections.isEmpty' call
|
|
34987
34981
|
if (!(tmp5_safe_receiver.length === 0)) {
|
|
@@ -34992,7 +34986,7 @@
|
|
|
34992
34986
|
tmp_9 = tmp_10;
|
|
34993
34987
|
}
|
|
34994
34988
|
var timeoutTime = tmp_9;
|
|
34995
|
-
var tmp_11 = map.d2('
|
|
34989
|
+
var tmp_11 = map.d2('leagues');
|
|
34996
34990
|
var tmp6_safe_receiver = (tmp_11 == null ? true : isArray(tmp_11)) ? tmp_11 : null;
|
|
34997
34991
|
var tmp_12;
|
|
34998
34992
|
if (tmp6_safe_receiver == null) {
|
|
@@ -35007,8 +35001,8 @@
|
|
|
35007
35001
|
while (inductionVariable_2 < last_2) {
|
|
35008
35002
|
var element_2 = tmp6_safe_receiver[inductionVariable_2];
|
|
35009
35003
|
inductionVariable_2 = inductionVariable_2 + 1 | 0;
|
|
35010
|
-
// Inline function 'GameHelperImpl.
|
|
35011
|
-
|
|
35004
|
+
// Inline function 'GameHelperImpl.prepareFilterObjectInternal.<anonymous>' call
|
|
35005
|
+
validateLeague($this, element_2);
|
|
35012
35006
|
}
|
|
35013
35007
|
tmp_12 = tmp6_safe_receiver;
|
|
35014
35008
|
}
|
|
@@ -35020,7 +35014,7 @@
|
|
|
35020
35014
|
// Inline function 'kotlin.takeIf' call
|
|
35021
35015
|
// Inline function 'kotlin.contracts.contract' call
|
|
35022
35016
|
var tmp_14;
|
|
35023
|
-
// Inline function 'GameHelperImpl.
|
|
35017
|
+
// Inline function 'GameHelperImpl.prepareFilterObjectInternal.<anonymous>' call
|
|
35024
35018
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
35025
35019
|
// Inline function 'kotlin.collections.isEmpty' call
|
|
35026
35020
|
if (!(tmp7_safe_receiver.length === 0)) {
|
|
@@ -35030,40 +35024,79 @@
|
|
|
35030
35024
|
}
|
|
35031
35025
|
tmp_13 = tmp_14;
|
|
35032
35026
|
}
|
|
35033
|
-
var
|
|
35034
|
-
var tmp_15 = map.d2('
|
|
35035
|
-
var
|
|
35027
|
+
var leagues = tmp_13;
|
|
35028
|
+
var tmp_15 = map.d2('rulesPreset');
|
|
35029
|
+
var tmp8_safe_receiver = (tmp_15 == null ? true : isArray(tmp_15)) ? tmp_15 : null;
|
|
35036
35030
|
var tmp_16;
|
|
35031
|
+
if (tmp8_safe_receiver == null) {
|
|
35032
|
+
tmp_16 = null;
|
|
35033
|
+
} else {
|
|
35034
|
+
// Inline function 'kotlin.collections.onEach' call
|
|
35035
|
+
// Inline function 'kotlin.apply' call
|
|
35036
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
35037
|
+
// Inline function 'kotlin.collections.onEach.<anonymous>' call
|
|
35038
|
+
var inductionVariable_3 = 0;
|
|
35039
|
+
var last_3 = tmp8_safe_receiver.length;
|
|
35040
|
+
while (inductionVariable_3 < last_3) {
|
|
35041
|
+
var element_3 = tmp8_safe_receiver[inductionVariable_3];
|
|
35042
|
+
inductionVariable_3 = inductionVariable_3 + 1 | 0;
|
|
35043
|
+
// Inline function 'GameHelperImpl.prepareFilterObjectInternal.<anonymous>' call
|
|
35044
|
+
validateRulesSetType($this, element_3);
|
|
35045
|
+
}
|
|
35046
|
+
tmp_16 = tmp8_safe_receiver;
|
|
35047
|
+
}
|
|
35048
|
+
var tmp9_safe_receiver = tmp_16;
|
|
35049
|
+
var tmp_17;
|
|
35050
|
+
if (tmp9_safe_receiver == null) {
|
|
35051
|
+
tmp_17 = null;
|
|
35052
|
+
} else {
|
|
35053
|
+
// Inline function 'kotlin.takeIf' call
|
|
35054
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
35055
|
+
var tmp_18;
|
|
35056
|
+
// Inline function 'GameHelperImpl.prepareFilterObjectInternal.<anonymous>' call
|
|
35057
|
+
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
35058
|
+
// Inline function 'kotlin.collections.isEmpty' call
|
|
35059
|
+
if (!(tmp9_safe_receiver.length === 0)) {
|
|
35060
|
+
tmp_18 = tmp9_safe_receiver;
|
|
35061
|
+
} else {
|
|
35062
|
+
tmp_18 = null;
|
|
35063
|
+
}
|
|
35064
|
+
tmp_17 = tmp_18;
|
|
35065
|
+
}
|
|
35066
|
+
var rulesPreset = tmp_17;
|
|
35067
|
+
var tmp_19 = map.d2('isChatEnabled');
|
|
35068
|
+
var isChatEnabled = (!(tmp_19 == null) ? typeof tmp_19 === 'boolean' : false) ? tmp_19 : null;
|
|
35069
|
+
var tmp_20;
|
|
35037
35070
|
if (players == null) {
|
|
35038
35071
|
// Inline function 'kotlin.arrayOf' call
|
|
35039
35072
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
35040
35073
|
// Inline function 'kotlin.js.asDynamic' call
|
|
35041
|
-
|
|
35074
|
+
tmp_20 = [2, 3, 4, 5];
|
|
35042
35075
|
} else {
|
|
35043
|
-
|
|
35076
|
+
tmp_20 = players;
|
|
35044
35077
|
}
|
|
35045
|
-
jsObject['players'] =
|
|
35046
|
-
var
|
|
35078
|
+
jsObject['players'] = tmp_20;
|
|
35079
|
+
var tmp_21;
|
|
35047
35080
|
if (points == null) {
|
|
35048
35081
|
// Inline function 'kotlin.arrayOf' call
|
|
35049
35082
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
35050
35083
|
// Inline function 'kotlin.js.asDynamic' call
|
|
35051
|
-
|
|
35084
|
+
tmp_21 = [301, 501, 1001];
|
|
35052
35085
|
} else {
|
|
35053
|
-
|
|
35086
|
+
tmp_21 = points;
|
|
35054
35087
|
}
|
|
35055
|
-
jsObject['points'] =
|
|
35056
|
-
var
|
|
35088
|
+
jsObject['points'] = tmp_21;
|
|
35089
|
+
var tmp_22;
|
|
35057
35090
|
if (timeoutTime == null) {
|
|
35058
35091
|
// Inline function 'kotlin.arrayOf' call
|
|
35059
35092
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
35060
35093
|
// Inline function 'kotlin.js.asDynamic' call
|
|
35061
|
-
|
|
35094
|
+
tmp_22 = [15, 30, 45];
|
|
35062
35095
|
} else {
|
|
35063
|
-
|
|
35096
|
+
tmp_22 = timeoutTime;
|
|
35064
35097
|
}
|
|
35065
|
-
jsObject['timeoutTime'] =
|
|
35066
|
-
var
|
|
35098
|
+
jsObject['timeoutTime'] = tmp_22;
|
|
35099
|
+
var tmp_23;
|
|
35067
35100
|
if (rulesPreset == null) {
|
|
35068
35101
|
// Inline function 'kotlin.collections.toTypedArray' call
|
|
35069
35102
|
// Inline function 'kotlin.collections.map' call
|
|
@@ -35073,23 +35106,47 @@
|
|
|
35073
35106
|
var tmp0_iterator = this_0.j();
|
|
35074
35107
|
while (tmp0_iterator.k()) {
|
|
35075
35108
|
var item = tmp0_iterator.l();
|
|
35076
|
-
// Inline function 'GameHelperImpl.
|
|
35077
|
-
var tmp$ret$
|
|
35078
|
-
destination.e(tmp$ret$
|
|
35109
|
+
// Inline function 'GameHelperImpl.prepareFilterObjectInternal.<anonymous>' call
|
|
35110
|
+
var tmp$ret$39 = item.i2_1;
|
|
35111
|
+
destination.e(tmp$ret$39);
|
|
35112
|
+
}
|
|
35113
|
+
tmp_23 = copyToArray(destination);
|
|
35114
|
+
} else {
|
|
35115
|
+
tmp_23 = rulesPreset;
|
|
35116
|
+
}
|
|
35117
|
+
jsObject['rulesPreset'] = tmp_23;
|
|
35118
|
+
var tmp_24;
|
|
35119
|
+
if (leagues == null) {
|
|
35120
|
+
// Inline function 'kotlin.collections.toTypedArray' call
|
|
35121
|
+
// Inline function 'kotlin.collections.map' call
|
|
35122
|
+
var this_1 = get_entries();
|
|
35123
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
35124
|
+
var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_1, 10));
|
|
35125
|
+
var tmp0_iterator_0 = this_1.j();
|
|
35126
|
+
while (tmp0_iterator_0.k()) {
|
|
35127
|
+
var item_0 = tmp0_iterator_0.l();
|
|
35128
|
+
// Inline function 'GameHelperImpl.prepareFilterObjectInternal.<anonymous>' call
|
|
35129
|
+
// Inline function 'kotlin.text.lowercase' call
|
|
35130
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
35131
|
+
var tmp$ret$45 = item_0.i2_1.toLowerCase();
|
|
35132
|
+
destination_0.e(tmp$ret$45);
|
|
35079
35133
|
}
|
|
35080
|
-
|
|
35134
|
+
tmp_24 = copyToArray(destination_0);
|
|
35081
35135
|
} else {
|
|
35082
|
-
|
|
35136
|
+
tmp_24 = leagues;
|
|
35083
35137
|
}
|
|
35084
|
-
jsObject['
|
|
35138
|
+
jsObject['leagues'] = tmp_24;
|
|
35085
35139
|
jsObject['isChatEnabled'] = isChatEnabled;
|
|
35086
35140
|
return jsObject;
|
|
35087
35141
|
}
|
|
35088
|
-
function isValidConfig($this, players, points, timeoutTime, rulesPreset, rules) {
|
|
35142
|
+
function isValidConfig($this, players, points, timeoutTime, rulesPreset, league, rules) {
|
|
35089
35143
|
validatePoints($this, points);
|
|
35090
35144
|
validatePlayers($this, players);
|
|
35091
35145
|
validateTimeoutTime($this, timeoutTime);
|
|
35092
35146
|
validateRulesSetType($this, rulesPreset);
|
|
35147
|
+
if (!(league == null)) {
|
|
35148
|
+
validateLeague($this, league);
|
|
35149
|
+
}
|
|
35093
35150
|
validateRules($this, rules);
|
|
35094
35151
|
return true;
|
|
35095
35152
|
}
|
|
@@ -35333,6 +35390,22 @@
|
|
|
35333
35390
|
throw IllegalStateException_init_$Create$('Not valid points mode ' + points);
|
|
35334
35391
|
}
|
|
35335
35392
|
}
|
|
35393
|
+
function validateLeague($this, league) {
|
|
35394
|
+
// Inline function 'kotlin.collections.map' call
|
|
35395
|
+
var this_0 = get_entries();
|
|
35396
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
35397
|
+
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
35398
|
+
var tmp0_iterator = this_0.j();
|
|
35399
|
+
while (tmp0_iterator.k()) {
|
|
35400
|
+
var item = tmp0_iterator.l();
|
|
35401
|
+
// Inline function 'GameHelperImpl.validateLeague.<anonymous>' call
|
|
35402
|
+
var tmp$ret$0 = item.i2_1;
|
|
35403
|
+
destination.e(tmp$ret$0);
|
|
35404
|
+
}
|
|
35405
|
+
if (!destination.p1(league)) {
|
|
35406
|
+
throw IllegalStateException_init_$Create$('Not valid league ' + league);
|
|
35407
|
+
}
|
|
35408
|
+
}
|
|
35336
35409
|
function validateRulesSetType($this, rulesSetType) {
|
|
35337
35410
|
// Inline function 'kotlin.collections.map' call
|
|
35338
35411
|
var this_0 = get_entries_2();
|
|
@@ -35673,13 +35746,13 @@
|
|
|
35673
35746
|
tmp_0 = tmp0_safe_receiver;
|
|
35674
35747
|
}
|
|
35675
35748
|
var limit = tmp_0;
|
|
35676
|
-
var jsObject =
|
|
35749
|
+
var jsObject = prepareFilterObjectInternal(this, map);
|
|
35677
35750
|
jsObject['limit'] = limit == null ? 20 : limit;
|
|
35678
35751
|
return jsObject;
|
|
35679
35752
|
};
|
|
35680
35753
|
protoOf(GameHelperImpl).prepareConfigObject = function (config) {
|
|
35681
35754
|
var map = mapOfObject(config);
|
|
35682
|
-
return
|
|
35755
|
+
return prepareFilterObjectInternal(this, map);
|
|
35683
35756
|
};
|
|
35684
35757
|
protoOf(GameHelperImpl).isValidConfigObject = function (config) {
|
|
35685
35758
|
var map = mapOfObject(config);
|
|
@@ -35692,13 +35765,14 @@
|
|
|
35692
35765
|
var tmp_4 = (!(tmp_3 == null) ? typeof tmp_3 === 'number' : false) ? tmp_3 : THROW_CCE();
|
|
35693
35766
|
var tmp_5 = getValue(map, 'rulesPreset');
|
|
35694
35767
|
var tmp_6 = (!(tmp_5 == null) ? typeof tmp_5 === 'string' : false) ? tmp_5 : THROW_CCE();
|
|
35695
|
-
var tmp_7;
|
|
35768
|
+
var tmp_7 = map.d2('league');
|
|
35769
|
+
var tmp_8;
|
|
35696
35770
|
if (rules != null && rules != undefined) {
|
|
35697
|
-
|
|
35771
|
+
tmp_8 = mapRulesObject(this, rules);
|
|
35698
35772
|
} else {
|
|
35699
|
-
|
|
35773
|
+
tmp_8 = null;
|
|
35700
35774
|
}
|
|
35701
|
-
return isValidConfig(this, tmp_0, tmp_2, tmp_4, tmp_6, tmp_7);
|
|
35775
|
+
return isValidConfig(this, tmp_0, tmp_2, tmp_4, tmp_6, tmp_7, tmp_8);
|
|
35702
35776
|
};
|
|
35703
35777
|
protoOf(GameHelperImpl).getRulesByType = function (rulesSetType) {
|
|
35704
35778
|
var tmp;
|
|
@@ -35751,6 +35825,12 @@
|
|
|
35751
35825
|
protoOf(GameHelperImpl).mapRulesSetType = function (name) {
|
|
35752
35826
|
return valueOf_6(name);
|
|
35753
35827
|
};
|
|
35828
|
+
protoOf(GameHelperImpl).mapToLeague = function (name) {
|
|
35829
|
+
// Inline function 'kotlin.text.uppercase' call
|
|
35830
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
35831
|
+
var tmp$ret$1 = name.toUpperCase();
|
|
35832
|
+
return valueOf_0(tmp$ret$1);
|
|
35833
|
+
};
|
|
35754
35834
|
function GameResources() {
|
|
35755
35835
|
}
|
|
35756
35836
|
var AvatarSet_ORIGIN_instance;
|
|
@@ -36099,6 +36179,12 @@
|
|
|
36099
36179
|
protoOf(RatingHelperImpl).getLeaguesConfig = function () {
|
|
36100
36180
|
return this.e40_1.z3u();
|
|
36101
36181
|
};
|
|
36182
|
+
protoOf(RatingHelperImpl).mapToLeague = function (name) {
|
|
36183
|
+
// Inline function 'kotlin.text.uppercase' call
|
|
36184
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
36185
|
+
var tmp$ret$1 = name.toUpperCase();
|
|
36186
|
+
return valueOf_0(tmp$ret$1);
|
|
36187
|
+
};
|
|
36102
36188
|
function engineHelpersModule() {
|
|
36103
36189
|
return Module_init_$Create$('Engine helpers Module', VOID, VOID, engineHelpersModule$lambda);
|
|
36104
36190
|
}
|