client_plugin_logic_deb 1.8.358 → 1.8.363
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/Kosi-Kaverit-kaverit.js +95 -95
- package/Kosi-Kaverit-kaverit.js.map +1 -1
- package/Kosi-Kodein-kodein-di.js +809 -806
- package/Kosi-Kodein-kodein-di.js.map +1 -1
- package/Kotlin-DateTime-library-kotlinx-datetime.js +2092 -2031
- package/Kotlin-DateTime-library-kotlinx-datetime.js.map +1 -1
- package/Logic_Debertz-client_plugin.d.ts +42 -15
- package/Logic_Debertz-client_plugin.js +5154 -5573
- package/Logic_Debertz-client_plugin.js.map +1 -1
- package/Logic_Debertz-core.js +2335 -2387
- package/Logic_Debertz-core.js.map +1 -1
- package/Logic_Debertz-engine.js +24597 -24359
- package/Logic_Debertz-engine.js.map +1 -1
- package/Logic_Debertz-game_client.js +13279 -13929
- package/Logic_Debertz-game_client.js.map +1 -1
- package/Logic_Debertz-game_server.js +1937 -1991
- package/Logic_Debertz-game_server.js.map +1 -1
- package/error-library-error.js +7 -7
- package/kotlin-kotlin-stdlib.js +5893 -5841
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kotlinx-atomicfu.js +66 -62
- package/kotlinx-atomicfu.js.map +1 -1
- package/kotlinx-coroutines-core.js +4143 -4174
- package/kotlinx-coroutines-core.js.map +1 -1
- package/kotlinx-io-kotlinx-io-core.js +497 -481
- package/kotlinx-io-kotlinx-io-core.js.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-core.js +2660 -2656
- package/kotlinx-serialization-kotlinx-serialization-core.js.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-json.js +1805 -1793
- package/kotlinx-serialization-kotlinx-serialization-json.js.map +1 -1
- package/ktor-ktor-client-content-negotiation.js +262 -269
- package/ktor-ktor-client-content-negotiation.js.map +1 -1
- package/ktor-ktor-client-core.js +2677 -2753
- package/ktor-ktor-client-core.js.map +1 -1
- package/ktor-ktor-client-logging.js +581 -606
- package/ktor-ktor-client-logging.js.map +1 -1
- package/ktor-ktor-events.js +13 -13
- package/ktor-ktor-http.js +996 -992
- package/ktor-ktor-http.js.map +1 -1
- package/ktor-ktor-io.js +2028 -2022
- package/ktor-ktor-io.js.map +1 -1
- package/ktor-ktor-serialization-kotlinx-json.js +9 -9
- package/ktor-ktor-serialization-kotlinx.js +300 -316
- package/ktor-ktor-serialization-kotlinx.js.map +1 -1
- package/ktor-ktor-serialization.js +138 -146
- package/ktor-ktor-serialization.js.map +1 -1
- package/ktor-ktor-utils.js +851 -861
- package/ktor-ktor-utils.js.map +1 -1
- package/ktor-ktor-websockets.js +61 -61
- package/ktor-ktor-websockets.js.map +1 -1
- package/package.json +1 -1
- package/random-library-crypto-rand.js +31 -31
- package/random-library-crypto-rand.js.map +1 -1
- package/random-library-secure-random.js +10 -10
- package/random-library-secure-random.js.map +1 -1
- package/raspberry-cardgame-lib-core.js +393 -396
- package/raspberry-cardgame-lib-core.js.map +1 -1
- package/raspberry-cardgame-lib-logger.js +119 -119
- package/raspberry-cardgame-lib-logger.js.map +1 -1
- package/raspberry-cardgame-lib-random.js +1167 -1194
- package/raspberry-cardgame-lib-random.js.map +1 -1
- package/uuid.js +39 -39
- package/uuid.js.map +1 -1
|
@@ -19,74 +19,74 @@
|
|
|
19
19
|
'use strict';
|
|
20
20
|
//region block: imports
|
|
21
21
|
var imul = Math.imul;
|
|
22
|
-
var protoOf = kotlin_kotlin.$_$.
|
|
23
|
-
var initMetadataForObject = kotlin_kotlin.$_$.
|
|
24
|
-
var defineProp = kotlin_kotlin.$_$.
|
|
25
|
-
var
|
|
26
|
-
var
|
|
27
|
-
var
|
|
28
|
-
var initMetadataForClass = kotlin_kotlin.$_$.
|
|
29
|
-
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.
|
|
30
|
-
var Unit_instance = kotlin_kotlin.$_$.
|
|
31
|
-
var take = kotlin_kotlin.$_$.
|
|
32
|
-
var toList = kotlin_kotlin.$_$.
|
|
33
|
-
var takeLast = kotlin_kotlin.$_$.
|
|
34
|
-
var noWhenBranchMatchedException = kotlin_kotlin.$_$.
|
|
35
|
-
var initMetadataForCompanion = kotlin_kotlin.$_$.
|
|
36
|
-
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.
|
|
37
|
-
var Enum = kotlin_kotlin.$_$.
|
|
22
|
+
var protoOf = kotlin_kotlin.$_$.md;
|
|
23
|
+
var initMetadataForObject = kotlin_kotlin.$_$.rc;
|
|
24
|
+
var defineProp = kotlin_kotlin.$_$.ec;
|
|
25
|
+
var VOID = kotlin_kotlin.$_$.b;
|
|
26
|
+
var THROW_CCE = kotlin_kotlin.$_$.qh;
|
|
27
|
+
var Comparator = kotlin_kotlin.$_$.ch;
|
|
28
|
+
var initMetadataForClass = kotlin_kotlin.$_$.mc;
|
|
29
|
+
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.h;
|
|
30
|
+
var Unit_instance = kotlin_kotlin.$_$.g5;
|
|
31
|
+
var take = kotlin_kotlin.$_$.j9;
|
|
32
|
+
var toList = kotlin_kotlin.$_$.n9;
|
|
33
|
+
var takeLast = kotlin_kotlin.$_$.i9;
|
|
34
|
+
var noWhenBranchMatchedException = kotlin_kotlin.$_$.oi;
|
|
35
|
+
var initMetadataForCompanion = kotlin_kotlin.$_$.nc;
|
|
36
|
+
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.p1;
|
|
37
|
+
var Enum = kotlin_kotlin.$_$.fh;
|
|
38
38
|
var createSimpleEnumSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.i2;
|
|
39
|
-
var enumEntries = kotlin_kotlin.$_$.
|
|
40
|
-
var LazyThreadSafetyMode_PUBLICATION_getInstance = kotlin_kotlin.$_$.
|
|
41
|
-
var lazy = kotlin_kotlin.$_$.
|
|
39
|
+
var enumEntries = kotlin_kotlin.$_$.ua;
|
|
40
|
+
var LazyThreadSafetyMode_PUBLICATION_getInstance = kotlin_kotlin.$_$.e;
|
|
41
|
+
var lazy = kotlin_kotlin.$_$.mi;
|
|
42
42
|
var SerializerFactory = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.g2;
|
|
43
|
-
var initMetadataForInterface = kotlin_kotlin.$_$.
|
|
44
|
-
var collectionSizeOrDefault = kotlin_kotlin.$_$.
|
|
45
|
-
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.
|
|
43
|
+
var initMetadataForInterface = kotlin_kotlin.$_$.pc;
|
|
44
|
+
var collectionSizeOrDefault = kotlin_kotlin.$_$.k6;
|
|
45
|
+
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.g;
|
|
46
46
|
var SecureRandom = kotlin_io_raspberryapps_cardgame_random.$_$.j;
|
|
47
|
-
var CoroutineImpl = kotlin_kotlin.$_$.
|
|
48
|
-
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.
|
|
49
|
-
var initMetadataForCoroutine = kotlin_kotlin.$_$.
|
|
50
|
-
var Result = kotlin_kotlin.$_$.
|
|
51
|
-
var Result__exceptionOrNull_impl_p6xea9 = kotlin_kotlin.$_$.
|
|
52
|
-
var throwOnFailure = kotlin_kotlin.$_$.
|
|
53
|
-
var _Result___get_value__impl__bjfvqg = kotlin_kotlin.$_$.
|
|
54
|
-
var _Result___get_isSuccess__impl__sndoy8 = kotlin_kotlin.$_$.
|
|
55
|
-
var addAll = kotlin_kotlin.$_$.
|
|
56
|
-
var until = kotlin_kotlin.$_$.
|
|
57
|
-
var count = kotlin_kotlin.$_$.
|
|
58
|
-
var Collection = kotlin_kotlin.$_$.
|
|
59
|
-
var isInterface = kotlin_kotlin.$_$.
|
|
60
|
-
var toMutableList = kotlin_kotlin.$_$.
|
|
47
|
+
var CoroutineImpl = kotlin_kotlin.$_$.sa;
|
|
48
|
+
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.da;
|
|
49
|
+
var initMetadataForCoroutine = kotlin_kotlin.$_$.oc;
|
|
50
|
+
var Result = kotlin_kotlin.$_$.oh;
|
|
51
|
+
var Result__exceptionOrNull_impl_p6xea9 = kotlin_kotlin.$_$.v2;
|
|
52
|
+
var throwOnFailure = kotlin_kotlin.$_$.si;
|
|
53
|
+
var _Result___get_value__impl__bjfvqg = kotlin_kotlin.$_$.y2;
|
|
54
|
+
var _Result___get_isSuccess__impl__sndoy8 = kotlin_kotlin.$_$.x2;
|
|
55
|
+
var addAll = kotlin_kotlin.$_$.y5;
|
|
56
|
+
var until = kotlin_kotlin.$_$.de;
|
|
57
|
+
var count = kotlin_kotlin.$_$.b7;
|
|
58
|
+
var Collection = kotlin_kotlin.$_$.i5;
|
|
59
|
+
var isInterface = kotlin_kotlin.$_$.ad;
|
|
60
|
+
var toMutableList = kotlin_kotlin.$_$.s9;
|
|
61
61
|
var riffle = kotlin_io_raspberryapps_cardgame_random.$_$.l;
|
|
62
62
|
var overhand = kotlin_io_raspberryapps_cardgame_random.$_$.k;
|
|
63
|
-
var listOf = kotlin_kotlin.$_$.
|
|
64
|
-
var first = kotlin_kotlin.$_$.
|
|
65
|
-
var sorted = kotlin_kotlin.$_$.
|
|
66
|
-
var asReversed = kotlin_kotlin.$_$.
|
|
67
|
-
var NoSuchElementException_init_$Create$ = kotlin_kotlin.$_$.
|
|
68
|
-
var equals = kotlin_kotlin.$_$.
|
|
69
|
-
var FunctionAdapter = kotlin_kotlin.$_$.
|
|
70
|
-
var hashCode = kotlin_kotlin.$_$.
|
|
71
|
-
var first_0 = kotlin_kotlin.$_$.
|
|
72
|
-
var compareValues = kotlin_kotlin.$_$.
|
|
73
|
-
var sortWith = kotlin_kotlin.$_$.
|
|
74
|
-
var lastOrNull = kotlin_kotlin.$_$.
|
|
75
|
-
var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.
|
|
76
|
-
var sortedWith = kotlin_kotlin.$_$.
|
|
77
|
-
var NoSuchElementException_init_$Create$_0 = kotlin_kotlin.$_$.
|
|
78
|
-
var compareTo = kotlin_kotlin.$_$.
|
|
79
|
-
var toString = kotlin_kotlin.$_$.
|
|
80
|
-
var dropLast = kotlin_kotlin.$_$.
|
|
81
|
-
var plus = kotlin_kotlin.$_$.
|
|
82
|
-
var minus = kotlin_kotlin.$_$.
|
|
83
|
-
var plus_0 = kotlin_kotlin.$_$.
|
|
63
|
+
var listOf = kotlin_kotlin.$_$.j8;
|
|
64
|
+
var first = kotlin_kotlin.$_$.o7;
|
|
65
|
+
var sorted = kotlin_kotlin.$_$.g9;
|
|
66
|
+
var asReversed = kotlin_kotlin.$_$.c6;
|
|
67
|
+
var NoSuchElementException_init_$Create$ = kotlin_kotlin.$_$.w1;
|
|
68
|
+
var equals = kotlin_kotlin.$_$.fc;
|
|
69
|
+
var FunctionAdapter = kotlin_kotlin.$_$.sb;
|
|
70
|
+
var hashCode = kotlin_kotlin.$_$.lc;
|
|
71
|
+
var first_0 = kotlin_kotlin.$_$.n7;
|
|
72
|
+
var compareValues = kotlin_kotlin.$_$.ba;
|
|
73
|
+
var sortWith = kotlin_kotlin.$_$.e9;
|
|
74
|
+
var lastOrNull = kotlin_kotlin.$_$.d8;
|
|
75
|
+
var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.q;
|
|
76
|
+
var sortedWith = kotlin_kotlin.$_$.f9;
|
|
77
|
+
var NoSuchElementException_init_$Create$_0 = kotlin_kotlin.$_$.u1;
|
|
78
|
+
var compareTo = kotlin_kotlin.$_$.dc;
|
|
79
|
+
var toString = kotlin_kotlin.$_$.pd;
|
|
80
|
+
var dropLast = kotlin_kotlin.$_$.d7;
|
|
81
|
+
var plus = kotlin_kotlin.$_$.t8;
|
|
82
|
+
var minus = kotlin_kotlin.$_$.n8;
|
|
83
|
+
var plus_0 = kotlin_kotlin.$_$.u8;
|
|
84
84
|
//endregion
|
|
85
85
|
//region block: pre-declaration
|
|
86
86
|
initMetadataForObject(CoreConfig, 'CoreConfig');
|
|
87
|
-
initMetadataForObject(CardIndexComparator, 'CardIndexComparator', VOID, VOID, [Comparator]);
|
|
88
87
|
initMetadataForClass(CardSuitSortingComparator, 'CardSuitSortingComparator', VOID, VOID, [Comparator]);
|
|
89
88
|
initMetadataForObject(CardNumberComparator, 'CardNumberComparator', VOID, VOID, [Comparator]);
|
|
89
|
+
initMetadataForObject(CardIndexComparator, 'CardIndexComparator', VOID, VOID, [Comparator]);
|
|
90
90
|
initMetadataForCompanion(Companion);
|
|
91
91
|
initMetadataForClass(CardName, 'CardName', VOID, Enum);
|
|
92
92
|
initMetadataForCompanion(Companion_0);
|
|
@@ -96,11 +96,11 @@
|
|
|
96
96
|
initMetadataForClass(CardsRandomProvider, 'CardsRandomProvider', VOID, Enum);
|
|
97
97
|
function standardShuffledCards$default(cards, times, $super) {
|
|
98
98
|
times = times === VOID ? 3 : times;
|
|
99
|
-
return $super === VOID ? this.
|
|
99
|
+
return $super === VOID ? this.i5t(cards, times) : $super.i5t.call(this, cards, times);
|
|
100
100
|
}
|
|
101
101
|
function realLifeShuffledCards$default(cards, times, $super) {
|
|
102
102
|
times = times === VOID ? 20 : times;
|
|
103
|
-
return $super === VOID ? this.
|
|
103
|
+
return $super === VOID ? this.k5t(cards, times) : $super.k5t.call(this, cards, times);
|
|
104
104
|
}
|
|
105
105
|
initMetadataForInterface(CardsDealerProvider, 'CardsDealerProvider', VOID, VOID, VOID, [5]);
|
|
106
106
|
initMetadataForCompanion(Companion_2);
|
|
@@ -113,12 +113,12 @@
|
|
|
113
113
|
checkFromIndex = checkFromIndex === VOID ? first(supportedCombinations) : checkFromIndex;
|
|
114
114
|
includeCardNames = includeCardNames === VOID ? null : includeCardNames;
|
|
115
115
|
suit = suit === VOID ? null : suit;
|
|
116
|
-
return $super === VOID ? this.
|
|
116
|
+
return $super === VOID ? this.a5v(cards, supportedCombinations, checkFromIndex, includeCardNames, suit) : $super.a5v.call(this, cards, supportedCombinations, checkFromIndex, includeCardNames, suit);
|
|
117
117
|
}
|
|
118
118
|
function findSameCardsNumberCombinations$default(cards, cardsCount, includeCardNames, $super) {
|
|
119
119
|
cardsCount = cardsCount === VOID ? 4 : cardsCount;
|
|
120
120
|
includeCardNames = includeCardNames === VOID ? null : includeCardNames;
|
|
121
|
-
return $super === VOID ? this.
|
|
121
|
+
return $super === VOID ? this.c5v(cards, cardsCount, includeCardNames) : $super.c5v.call(this, cards, cardsCount, includeCardNames);
|
|
122
122
|
}
|
|
123
123
|
initMetadataForInterface(CombinationsCheckerProvider, 'CombinationsCheckerProvider');
|
|
124
124
|
initMetadataForClass(sam$kotlin_Comparator$0, 'sam$kotlin_Comparator$0', VOID, VOID, [Comparator, FunctionAdapter]);
|
|
@@ -129,65 +129,52 @@
|
|
|
129
129
|
function CoreConfig() {
|
|
130
130
|
this.version = '0.0.53';
|
|
131
131
|
}
|
|
132
|
-
protoOf(CoreConfig).
|
|
132
|
+
protoOf(CoreConfig).e3y = function () {
|
|
133
133
|
return this.version;
|
|
134
134
|
};
|
|
135
135
|
var CoreConfig_instance;
|
|
136
136
|
function CoreConfig_getInstance() {
|
|
137
137
|
return CoreConfig_instance;
|
|
138
138
|
}
|
|
139
|
-
function CardIndexComparator() {
|
|
140
|
-
}
|
|
141
|
-
protoOf(CardIndexComparator).p6k = function (a, b) {
|
|
142
|
-
return a.q6k_1 - b.q6k_1 | 0;
|
|
143
|
-
};
|
|
144
|
-
protoOf(CardIndexComparator).compare = function (a, b) {
|
|
145
|
-
var tmp = a instanceof GameCard ? a : THROW_CCE();
|
|
146
|
-
return this.p6k(tmp, b instanceof GameCard ? b : THROW_CCE());
|
|
147
|
-
};
|
|
148
|
-
var CardIndexComparator_instance;
|
|
149
|
-
function CardIndexComparator_getInstance() {
|
|
150
|
-
return CardIndexComparator_instance;
|
|
151
|
-
}
|
|
152
139
|
function CardSuitSortingComparator(suit) {
|
|
153
|
-
this.
|
|
140
|
+
this.l5s_1 = suit;
|
|
154
141
|
}
|
|
155
|
-
protoOf(CardSuitSortingComparator).
|
|
156
|
-
if (!a.
|
|
142
|
+
protoOf(CardSuitSortingComparator).m5s = function (a, b) {
|
|
143
|
+
if (!a.o5s() || !b.o5s()) {
|
|
157
144
|
return 0;
|
|
158
145
|
}
|
|
159
|
-
var suitIndexL = this.
|
|
160
|
-
var suitIndexR = this.
|
|
161
|
-
var sortedNumberL = imul(suitIndexL, 13) + a.
|
|
162
|
-
var sortedNumberR = imul(suitIndexR, 13) + b.
|
|
146
|
+
var suitIndexL = this.l5s_1.v1(a.p5s());
|
|
147
|
+
var suitIndexR = this.l5s_1.v1(b.p5s());
|
|
148
|
+
var sortedNumberL = imul(suitIndexL, 13) + a.q5s() | 0;
|
|
149
|
+
var sortedNumberR = imul(suitIndexR, 13) + b.q5s() | 0;
|
|
163
150
|
return sortedNumberL - sortedNumberR | 0;
|
|
164
151
|
};
|
|
165
152
|
protoOf(CardSuitSortingComparator).compare = function (a, b) {
|
|
166
153
|
var tmp = a instanceof GameCard ? a : THROW_CCE();
|
|
167
|
-
return this.
|
|
154
|
+
return this.m5s(tmp, b instanceof GameCard ? b : THROW_CCE());
|
|
168
155
|
};
|
|
169
156
|
function filterByCardName(_this__u8e3s4, name) {
|
|
170
157
|
// Inline function 'kotlin.collections.filter' call
|
|
171
158
|
var predicate = byCardNamePredicate(name.slice());
|
|
172
159
|
// Inline function 'kotlin.collections.filterTo' call
|
|
173
160
|
var destination = ArrayList_init_$Create$();
|
|
174
|
-
var _iterator__ex2g4s = _this__u8e3s4.
|
|
175
|
-
while (_iterator__ex2g4s.
|
|
176
|
-
var element = _iterator__ex2g4s.
|
|
161
|
+
var _iterator__ex2g4s = _this__u8e3s4.l();
|
|
162
|
+
while (_iterator__ex2g4s.m()) {
|
|
163
|
+
var element = _iterator__ex2g4s.n();
|
|
177
164
|
if (predicate(element)) {
|
|
178
|
-
destination.
|
|
165
|
+
destination.j(element);
|
|
179
166
|
}
|
|
180
167
|
}
|
|
181
168
|
return destination;
|
|
182
169
|
}
|
|
183
170
|
function CardNumberComparator() {
|
|
184
171
|
}
|
|
185
|
-
protoOf(CardNumberComparator).
|
|
186
|
-
return b.
|
|
172
|
+
protoOf(CardNumberComparator).m5s = function (a, b) {
|
|
173
|
+
return b.q5s() - a.q5s() | 0;
|
|
187
174
|
};
|
|
188
175
|
protoOf(CardNumberComparator).compare = function (a, b) {
|
|
189
176
|
var tmp = a instanceof GameCard ? a : THROW_CCE();
|
|
190
|
-
return this.
|
|
177
|
+
return this.m5s(tmp, b instanceof GameCard ? b : THROW_CCE());
|
|
191
178
|
};
|
|
192
179
|
var CardNumberComparator_instance;
|
|
193
180
|
function CardNumberComparator_getInstance() {
|
|
@@ -195,14 +182,27 @@
|
|
|
195
182
|
}
|
|
196
183
|
function distributeCardsBottom(_this__u8e3s4, count) {
|
|
197
184
|
var cardsToDeal = toList(take(_this__u8e3s4, count));
|
|
198
|
-
_this__u8e3s4.
|
|
185
|
+
_this__u8e3s4.g2(cardsToDeal);
|
|
199
186
|
return cardsToDeal;
|
|
200
187
|
}
|
|
201
188
|
function distributeCardsTop(_this__u8e3s4, count) {
|
|
202
189
|
var cardsToDeal = toList(takeLast(_this__u8e3s4, count));
|
|
203
|
-
_this__u8e3s4.
|
|
190
|
+
_this__u8e3s4.g2(cardsToDeal);
|
|
204
191
|
return cardsToDeal;
|
|
205
192
|
}
|
|
193
|
+
function CardIndexComparator() {
|
|
194
|
+
}
|
|
195
|
+
protoOf(CardIndexComparator).m5s = function (a, b) {
|
|
196
|
+
return a.n5s_1 - b.n5s_1 | 0;
|
|
197
|
+
};
|
|
198
|
+
protoOf(CardIndexComparator).compare = function (a, b) {
|
|
199
|
+
var tmp = a instanceof GameCard ? a : THROW_CCE();
|
|
200
|
+
return this.m5s(tmp, b instanceof GameCard ? b : THROW_CCE());
|
|
201
|
+
};
|
|
202
|
+
var CardIndexComparator_instance;
|
|
203
|
+
function CardIndexComparator_getInstance() {
|
|
204
|
+
return CardIndexComparator_instance;
|
|
205
|
+
}
|
|
206
206
|
function byCardNamePredicate(types) {
|
|
207
207
|
return byCardNamePredicate$lambda(types);
|
|
208
208
|
}
|
|
@@ -217,7 +217,7 @@
|
|
|
217
217
|
while (inductionVariable < last) {
|
|
218
218
|
var element = tmp0[inductionVariable];
|
|
219
219
|
inductionVariable = inductionVariable + 1 | 0;
|
|
220
|
-
if (p1.
|
|
220
|
+
if (p1.q2().equals(element)) {
|
|
221
221
|
tmp$ret$1 = true;
|
|
222
222
|
break $l$block;
|
|
223
223
|
}
|
|
@@ -243,7 +243,7 @@
|
|
|
243
243
|
var CardName_HIDDEN_instance;
|
|
244
244
|
function getShortName($this) {
|
|
245
245
|
var tmp;
|
|
246
|
-
switch ($this.
|
|
246
|
+
switch ($this.p2_1) {
|
|
247
247
|
case 0:
|
|
248
248
|
tmp = 'A';
|
|
249
249
|
break;
|
|
@@ -314,23 +314,23 @@
|
|
|
314
314
|
}
|
|
315
315
|
function Companion() {
|
|
316
316
|
}
|
|
317
|
-
protoOf(Companion).
|
|
317
|
+
protoOf(Companion).r5s = function (suit, number) {
|
|
318
318
|
return new GameCard(getNumber(Companion_instance_0, getName(Companion_instance_0, number), suit));
|
|
319
319
|
};
|
|
320
|
-
protoOf(Companion).
|
|
320
|
+
protoOf(Companion).s5s = function (suit, cardNumber) {
|
|
321
321
|
return new GameCard(getNumber(Companion_instance_0, cardNumber, suit));
|
|
322
322
|
};
|
|
323
|
-
protoOf(Companion).
|
|
323
|
+
protoOf(Companion).t5s = function (index) {
|
|
324
324
|
return new GameCard(index);
|
|
325
325
|
};
|
|
326
|
-
protoOf(Companion).
|
|
326
|
+
protoOf(Companion).u5s = function (position, playerIndex, previousHiddenCardWithMaxIndex, reverse) {
|
|
327
327
|
var tmp;
|
|
328
328
|
if (previousHiddenCardWithMaxIndex == null) {
|
|
329
329
|
tmp = null;
|
|
330
330
|
} else {
|
|
331
331
|
// Inline function 'kotlin.takeIf' call
|
|
332
332
|
var tmp_0;
|
|
333
|
-
if (previousHiddenCardWithMaxIndex.
|
|
333
|
+
if (previousHiddenCardWithMaxIndex.v5s()) {
|
|
334
334
|
tmp_0 = previousHiddenCardWithMaxIndex;
|
|
335
335
|
} else {
|
|
336
336
|
tmp_0 = null;
|
|
@@ -338,8 +338,8 @@
|
|
|
338
338
|
tmp = tmp_0;
|
|
339
339
|
}
|
|
340
340
|
var tmp1_safe_receiver = tmp;
|
|
341
|
-
var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.
|
|
342
|
-
var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : Companion_instance_0.
|
|
341
|
+
var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.n5s_1;
|
|
342
|
+
var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : Companion_instance_0.b5t(tmp2_safe_receiver, playerIndex, reverse);
|
|
343
343
|
var tmp_1;
|
|
344
344
|
if (tmp3_safe_receiver == null) {
|
|
345
345
|
tmp_1 = null;
|
|
@@ -358,12 +358,12 @@
|
|
|
358
358
|
var index = tmp_2;
|
|
359
359
|
return new GameCard(index);
|
|
360
360
|
};
|
|
361
|
-
protoOf(Companion).
|
|
361
|
+
protoOf(Companion).c5t = function (position, playerIndex, previousHiddenCardWithMaxIndex, reverse, $super) {
|
|
362
362
|
previousHiddenCardWithMaxIndex = previousHiddenCardWithMaxIndex === VOID ? null : previousHiddenCardWithMaxIndex;
|
|
363
363
|
reverse = reverse === VOID ? false : reverse;
|
|
364
|
-
return $super === VOID ? this.
|
|
364
|
+
return $super === VOID ? this.u5s(position, playerIndex, previousHiddenCardWithMaxIndex, reverse) : $super.u5s.call(this, position, playerIndex, previousHiddenCardWithMaxIndex, reverse);
|
|
365
365
|
};
|
|
366
|
-
protoOf(Companion).
|
|
366
|
+
protoOf(Companion).d5t = function (position) {
|
|
367
367
|
var index = 150 + position | 0;
|
|
368
368
|
return new GameCard(index);
|
|
369
369
|
};
|
|
@@ -376,7 +376,7 @@
|
|
|
376
376
|
}
|
|
377
377
|
function getCardNumber($this, number) {
|
|
378
378
|
var tmp;
|
|
379
|
-
switch (number.
|
|
379
|
+
switch (number.p2_1) {
|
|
380
380
|
case 12:
|
|
381
381
|
tmp = 0;
|
|
382
382
|
break;
|
|
@@ -469,7 +469,7 @@
|
|
|
469
469
|
return tmp;
|
|
470
470
|
}
|
|
471
471
|
function _get_isShirt__vd98rp($this) {
|
|
472
|
-
return $this.
|
|
472
|
+
return $this.n5s_1 >= 150 && $this.n5s_1 <= 202;
|
|
473
473
|
}
|
|
474
474
|
function CardName(name, ordinal) {
|
|
475
475
|
Enum.call(this, name, ordinal);
|
|
@@ -478,13 +478,13 @@
|
|
|
478
478
|
return getShortName(this);
|
|
479
479
|
};
|
|
480
480
|
function Companion_0() {
|
|
481
|
-
this.
|
|
482
|
-
this.
|
|
483
|
-
this.
|
|
484
|
-
this.
|
|
485
|
-
this.
|
|
481
|
+
this.w5s_1 = -1;
|
|
482
|
+
this.x5s_1 = 13;
|
|
483
|
+
this.y5s_1 = 52;
|
|
484
|
+
this.z5s_1 = 150;
|
|
485
|
+
this.a5t_1 = 53;
|
|
486
486
|
}
|
|
487
|
-
protoOf(Companion_0).
|
|
487
|
+
protoOf(Companion_0).b5t = function (_this__u8e3s4, playerIndex, reverse) {
|
|
488
488
|
var tmp;
|
|
489
489
|
if (reverse) {
|
|
490
490
|
tmp = _this__u8e3s4 + (53 + imul(playerIndex, 14) | 0) | 0;
|
|
@@ -554,59 +554,59 @@
|
|
|
554
554
|
return CardName_HIDDEN_instance;
|
|
555
555
|
}
|
|
556
556
|
function GameCard(index) {
|
|
557
|
-
this.
|
|
557
|
+
this.n5s_1 = index;
|
|
558
558
|
}
|
|
559
|
-
protoOf(GameCard).
|
|
559
|
+
protoOf(GameCard).p5s = function () {
|
|
560
560
|
var tmp;
|
|
561
|
-
var containsArg = this.
|
|
561
|
+
var containsArg = this.n5s_1;
|
|
562
562
|
if (0 <= containsArg ? containsArg <= 13 : false) {
|
|
563
563
|
tmp = Suit_DIAMOND_getInstance();
|
|
564
564
|
} else {
|
|
565
|
-
if (this.
|
|
565
|
+
if (this.n5s_1 <= 26) {
|
|
566
566
|
tmp = Suit_SPADE_getInstance();
|
|
567
567
|
} else {
|
|
568
|
-
if (this.
|
|
568
|
+
if (this.n5s_1 <= 39) {
|
|
569
569
|
tmp = Suit_HEART_getInstance();
|
|
570
570
|
} else {
|
|
571
|
-
if (this.
|
|
571
|
+
if (this.n5s_1 <= 52) {
|
|
572
572
|
tmp = Suit_CLUB_getInstance();
|
|
573
573
|
} else {
|
|
574
|
-
throw IllegalStateException_init_$Create$('Invalid suitCard in Card.getValue() ' + this.
|
|
574
|
+
throw IllegalStateException_init_$Create$('Invalid suitCard in Card.getValue() ' + this.n5s_1);
|
|
575
575
|
}
|
|
576
576
|
}
|
|
577
577
|
}
|
|
578
578
|
}
|
|
579
579
|
return tmp;
|
|
580
580
|
};
|
|
581
|
-
protoOf(GameCard).
|
|
581
|
+
protoOf(GameCard).q5s = function () {
|
|
582
582
|
var tmp;
|
|
583
|
-
if (this.
|
|
583
|
+
if (this.v5s()) {
|
|
584
584
|
tmp = -1;
|
|
585
585
|
} else {
|
|
586
|
-
tmp = this.
|
|
586
|
+
tmp = this.n5s_1 - imul(13, getIndex(this.p5s())) | 0;
|
|
587
587
|
}
|
|
588
588
|
return tmp;
|
|
589
589
|
};
|
|
590
|
-
protoOf(GameCard).
|
|
591
|
-
return this.
|
|
590
|
+
protoOf(GameCard).q2 = function () {
|
|
591
|
+
return this.v5s() ? CardName_HIDDEN_getInstance() : getName(Companion_instance_0, this.q5s());
|
|
592
592
|
};
|
|
593
|
-
protoOf(GameCard).
|
|
594
|
-
return !_get_isShirt__vd98rp(this) && !this.
|
|
593
|
+
protoOf(GameCard).o5s = function () {
|
|
594
|
+
return !_get_isShirt__vd98rp(this) && !this.v5s();
|
|
595
595
|
};
|
|
596
|
-
protoOf(GameCard).
|
|
597
|
-
return this.
|
|
596
|
+
protoOf(GameCard).v5s = function () {
|
|
597
|
+
return this.n5s_1 >= 53 && this.n5s_1 <= 105;
|
|
598
598
|
};
|
|
599
599
|
protoOf(GameCard).toString = function () {
|
|
600
600
|
if (_get_isShirt__vd98rp(this)) {
|
|
601
|
-
return 'GameCard(SHIRT, ' + this.
|
|
601
|
+
return 'GameCard(SHIRT, ' + this.n5s_1 + ')';
|
|
602
602
|
}
|
|
603
|
-
if (this.
|
|
604
|
-
return 'GameCard(HIDDEN, ' + this.
|
|
603
|
+
if (this.v5s()) {
|
|
604
|
+
return 'GameCard(HIDDEN, ' + this.n5s_1 + ')';
|
|
605
605
|
}
|
|
606
|
-
return 'GameCard(' + this.
|
|
606
|
+
return 'GameCard(' + this.p5s().toString() + this.q2().toString() + ', ' + this.n5s_1 + ')';
|
|
607
607
|
};
|
|
608
608
|
protoOf(GameCard).hashCode = function () {
|
|
609
|
-
return this.
|
|
609
|
+
return this.n5s_1;
|
|
610
610
|
};
|
|
611
611
|
protoOf(GameCard).equals = function (other) {
|
|
612
612
|
if (this === other)
|
|
@@ -614,12 +614,12 @@
|
|
|
614
614
|
if (!(other instanceof GameCard))
|
|
615
615
|
return false;
|
|
616
616
|
var tmp0_other_with_cast = other instanceof GameCard ? other : THROW_CCE();
|
|
617
|
-
if (!(this.
|
|
617
|
+
if (!(this.n5s_1 === tmp0_other_with_cast.n5s_1))
|
|
618
618
|
return false;
|
|
619
619
|
return true;
|
|
620
620
|
};
|
|
621
621
|
function _get_$cachedSerializer__te6jhj($this) {
|
|
622
|
-
return $this.
|
|
622
|
+
return $this.e5t_1.w();
|
|
623
623
|
}
|
|
624
624
|
function Suit$Companion$_anonymous__cbm2iq() {
|
|
625
625
|
return createSimpleEnumSerializer('io.raspberryapps.card_game.core.data.models.cards.Suit', values());
|
|
@@ -630,7 +630,7 @@
|
|
|
630
630
|
var Suit_CLUB_instance;
|
|
631
631
|
function getSuitEmoji($this) {
|
|
632
632
|
var tmp;
|
|
633
|
-
switch ($this.
|
|
633
|
+
switch ($this.p2_1) {
|
|
634
634
|
case 0:
|
|
635
635
|
tmp = '\u2666\uFE0F';
|
|
636
636
|
break;
|
|
@@ -661,13 +661,13 @@
|
|
|
661
661
|
Companion_instance_1 = this;
|
|
662
662
|
var tmp = this;
|
|
663
663
|
var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
664
|
-
tmp.
|
|
664
|
+
tmp.e5t_1 = lazy(tmp_0, Suit$Companion$_anonymous__cbm2iq);
|
|
665
665
|
}
|
|
666
|
-
protoOf(Companion_1).
|
|
666
|
+
protoOf(Companion_1).o4s = function () {
|
|
667
667
|
return _get_$cachedSerializer__te6jhj(this);
|
|
668
668
|
};
|
|
669
|
-
protoOf(Companion_1).
|
|
670
|
-
return this.
|
|
669
|
+
protoOf(Companion_1).g10 = function (typeParamsSerializers) {
|
|
670
|
+
return this.o4s();
|
|
671
671
|
};
|
|
672
672
|
var Companion_instance_1;
|
|
673
673
|
function Companion_getInstance_1() {
|
|
@@ -712,7 +712,7 @@
|
|
|
712
712
|
}
|
|
713
713
|
function getIndex(_this__u8e3s4) {
|
|
714
714
|
var tmp;
|
|
715
|
-
switch (_this__u8e3s4.
|
|
715
|
+
switch (_this__u8e3s4.p2_1) {
|
|
716
716
|
case 0:
|
|
717
717
|
tmp = 0;
|
|
718
718
|
break;
|
|
@@ -762,29 +762,29 @@
|
|
|
762
762
|
}
|
|
763
763
|
function getRandomOrgCards($this, leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundsCount, userData, signed, $completion) {
|
|
764
764
|
var tmp = new $getRandomOrgCardsCOROUTINE$($this, leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundsCount, userData, signed, $completion);
|
|
765
|
-
tmp.
|
|
766
|
-
tmp.
|
|
767
|
-
return tmp.
|
|
765
|
+
tmp.t8_1 = Unit_instance;
|
|
766
|
+
tmp.u8_1 = null;
|
|
767
|
+
return tmp.z8();
|
|
768
768
|
}
|
|
769
769
|
function normalizeCards($this, cards, leftCardIndexForEachSuit) {
|
|
770
|
-
var oneSuitCount = cards.
|
|
770
|
+
var oneSuitCount = cards.o() / get_entries().o() | 0;
|
|
771
771
|
// Inline function 'kotlin.collections.map' call
|
|
772
772
|
// Inline function 'kotlin.collections.mapTo' call
|
|
773
773
|
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(cards, 10));
|
|
774
|
-
var _iterator__ex2g4s = cards.
|
|
775
|
-
while (_iterator__ex2g4s.
|
|
776
|
-
var item = _iterator__ex2g4s.
|
|
774
|
+
var _iterator__ex2g4s = cards.l();
|
|
775
|
+
while (_iterator__ex2g4s.m()) {
|
|
776
|
+
var item = _iterator__ex2g4s.n();
|
|
777
777
|
var previousSuitNumber = item / oneSuitCount | 0;
|
|
778
778
|
var cardIndexShift = imul(leftCardIndexForEachSuit, previousSuitNumber + 1 | 0);
|
|
779
779
|
var newIndex = item + cardIndexShift | 0;
|
|
780
|
-
destination.
|
|
780
|
+
destination.j(newIndex);
|
|
781
781
|
}
|
|
782
782
|
var newIndexes = destination;
|
|
783
783
|
return newIndexes;
|
|
784
784
|
}
|
|
785
785
|
function Companion_2() {
|
|
786
786
|
}
|
|
787
|
-
protoOf(Companion_2).
|
|
787
|
+
protoOf(Companion_2).c5u = function (randomPoolProvider, logger) {
|
|
788
788
|
var tmp0_random = new SecureRandom(logger);
|
|
789
789
|
return new CardsDealerProviderImpl(tmp0_random, randomPoolProvider, logger);
|
|
790
790
|
};
|
|
@@ -794,41 +794,40 @@
|
|
|
794
794
|
}
|
|
795
795
|
function $createNewShuffledCardDeckCOROUTINE$(_this__u8e3s4, leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundCountForGame, userData, provider, resultContinuation) {
|
|
796
796
|
CoroutineImpl.call(this, resultContinuation);
|
|
797
|
-
this.
|
|
798
|
-
this.
|
|
799
|
-
this.
|
|
800
|
-
this.
|
|
801
|
-
this.
|
|
802
|
-
this.
|
|
803
|
-
}
|
|
804
|
-
protoOf($createNewShuffledCardDeckCOROUTINE$).
|
|
805
|
-
var suspendResult = this.
|
|
797
|
+
this.l5u_1 = _this__u8e3s4;
|
|
798
|
+
this.m5u_1 = leftCardIndexForEachSuit;
|
|
799
|
+
this.n5u_1 = rightCardIndexForEachSuit;
|
|
800
|
+
this.o5u_1 = approximateRoundCountForGame;
|
|
801
|
+
this.p5u_1 = userData;
|
|
802
|
+
this.q5u_1 = provider;
|
|
803
|
+
}
|
|
804
|
+
protoOf($createNewShuffledCardDeckCOROUTINE$).z8 = function () {
|
|
805
|
+
var suspendResult = this.t8_1;
|
|
806
806
|
$sm: do
|
|
807
807
|
try {
|
|
808
|
-
var tmp = this.
|
|
808
|
+
var tmp = this.r8_1;
|
|
809
809
|
switch (tmp) {
|
|
810
810
|
case 0:
|
|
811
|
-
this.
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
if (this.c6n_1 === 0) {
|
|
811
|
+
this.s8_1 = 4;
|
|
812
|
+
var tmp0 = this.q5u_1.p2_1;
|
|
813
|
+
if (tmp0 === 0) {
|
|
815
814
|
var tmp_0 = this;
|
|
816
|
-
var it = this.
|
|
817
|
-
tmp_0.
|
|
818
|
-
this.
|
|
815
|
+
var it = this.l5u_1.f5t(this.m5u_1, this.n5u_1);
|
|
816
|
+
tmp_0.r5u_1 = this.l5u_1.j5t(it);
|
|
817
|
+
this.r8_1 = 3;
|
|
819
818
|
continue $sm;
|
|
820
819
|
} else {
|
|
821
|
-
if (
|
|
822
|
-
this.
|
|
823
|
-
suspendResult = getRandomOrgCards(this.
|
|
820
|
+
if (tmp0 === 1) {
|
|
821
|
+
this.r8_1 = 2;
|
|
822
|
+
suspendResult = getRandomOrgCards(this.l5u_1, this.m5u_1, this.n5u_1, this.o5u_1, this.p5u_1, false, this);
|
|
824
823
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
825
824
|
return suspendResult;
|
|
826
825
|
}
|
|
827
826
|
continue $sm;
|
|
828
827
|
} else {
|
|
829
|
-
if (
|
|
830
|
-
this.
|
|
831
|
-
suspendResult = getRandomOrgCards(this.
|
|
828
|
+
if (tmp0 === 2) {
|
|
829
|
+
this.r8_1 = 1;
|
|
830
|
+
suspendResult = getRandomOrgCards(this.l5u_1, this.m5u_1, this.n5u_1, this.o5u_1, this.p5u_1, true, this);
|
|
832
831
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
833
832
|
return suspendResult;
|
|
834
833
|
}
|
|
@@ -842,86 +841,84 @@
|
|
|
842
841
|
|
|
843
842
|
break;
|
|
844
843
|
case 1:
|
|
845
|
-
this.
|
|
846
|
-
this.
|
|
844
|
+
this.r5u_1 = suspendResult;
|
|
845
|
+
this.r8_1 = 3;
|
|
847
846
|
continue $sm;
|
|
848
847
|
case 2:
|
|
849
|
-
this.
|
|
850
|
-
this.
|
|
848
|
+
this.r5u_1 = suspendResult;
|
|
849
|
+
this.r8_1 = 3;
|
|
851
850
|
continue $sm;
|
|
852
851
|
case 3:
|
|
853
|
-
return this.
|
|
852
|
+
return this.r5u_1;
|
|
854
853
|
case 4:
|
|
855
|
-
throw this.
|
|
854
|
+
throw this.u8_1;
|
|
856
855
|
}
|
|
857
856
|
} catch ($p) {
|
|
858
857
|
var e = $p;
|
|
859
|
-
if (this.
|
|
858
|
+
if (this.s8_1 === 4) {
|
|
860
859
|
throw e;
|
|
861
860
|
} else {
|
|
862
|
-
this.
|
|
863
|
-
this.
|
|
861
|
+
this.r8_1 = this.s8_1;
|
|
862
|
+
this.u8_1 = e;
|
|
864
863
|
}
|
|
865
864
|
}
|
|
866
865
|
while (true);
|
|
867
866
|
};
|
|
868
867
|
function $getRandomOrgCardsCOROUTINE$(_this__u8e3s4, leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundsCount, userData, signed, resultContinuation) {
|
|
869
868
|
CoroutineImpl.call(this, resultContinuation);
|
|
870
|
-
this.
|
|
871
|
-
this.
|
|
872
|
-
this.
|
|
873
|
-
this.
|
|
874
|
-
this.
|
|
875
|
-
this.
|
|
876
|
-
}
|
|
877
|
-
protoOf($getRandomOrgCardsCOROUTINE$).
|
|
878
|
-
var suspendResult = this.
|
|
869
|
+
this.v5t_1 = _this__u8e3s4;
|
|
870
|
+
this.w5t_1 = leftCardIndexForEachSuit;
|
|
871
|
+
this.x5t_1 = rightCardIndexForEachSuit;
|
|
872
|
+
this.y5t_1 = approximateRoundsCount;
|
|
873
|
+
this.z5t_1 = userData;
|
|
874
|
+
this.a5u_1 = signed;
|
|
875
|
+
}
|
|
876
|
+
protoOf($getRandomOrgCardsCOROUTINE$).z8 = function () {
|
|
877
|
+
var suspendResult = this.t8_1;
|
|
879
878
|
$sm: do
|
|
880
879
|
try {
|
|
881
|
-
var tmp = this.
|
|
880
|
+
var tmp = this.r8_1;
|
|
882
881
|
switch (tmp) {
|
|
883
882
|
case 0:
|
|
884
|
-
this.
|
|
885
|
-
|
|
886
|
-
this
|
|
887
|
-
|
|
888
|
-
this.
|
|
889
|
-
suspendResult = this.
|
|
883
|
+
this.s8_1 = 5;
|
|
884
|
+
var cardsCount = this.v5t_1.m5t(this.w5t_1, this.x5t_1);
|
|
885
|
+
var tmp0_$this = this.v5t_1.t5u_1;
|
|
886
|
+
var tmp1_max = cardsCount - 1 | 0;
|
|
887
|
+
this.r8_1 = 1;
|
|
888
|
+
suspendResult = tmp0_$this.e5n(this.y5t_1, this.z5t_1, 0, tmp1_max, cardsCount, this.a5u_1, VOID, this);
|
|
890
889
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
891
890
|
return suspendResult;
|
|
892
891
|
}
|
|
893
892
|
|
|
894
|
-
this.
|
|
893
|
+
this.r8_1 = 2;
|
|
895
894
|
continue $sm;
|
|
896
895
|
case 1:
|
|
897
|
-
|
|
898
|
-
suspendResult = new Result(
|
|
899
|
-
this.
|
|
896
|
+
var unboxed = suspendResult.tl_1;
|
|
897
|
+
suspendResult = new Result(unboxed);
|
|
898
|
+
this.r8_1 = 2;
|
|
900
899
|
continue $sm;
|
|
901
900
|
case 2:
|
|
902
|
-
|
|
903
|
-
if (_Result___get_isSuccess__impl__sndoy8(
|
|
901
|
+
var result = suspendResult.tl_1;
|
|
902
|
+
if (_Result___get_isSuccess__impl__sndoy8(result)) {
|
|
904
903
|
var tmp_0 = this;
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
var tmp_1 = _Result___get_value__impl__bjfvqg(this_0);
|
|
904
|
+
throwOnFailure(result);
|
|
905
|
+
var tmp_1 = _Result___get_value__impl__bjfvqg(result);
|
|
908
906
|
var tmp2_cards = ((tmp_1 == null ? true : !(tmp_1 == null)) ? tmp_1 : THROW_CCE()).cards;
|
|
909
|
-
var
|
|
910
|
-
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(
|
|
911
|
-
var _iterator__ex2g4s =
|
|
912
|
-
while (_iterator__ex2g4s.
|
|
913
|
-
var item = _iterator__ex2g4s.
|
|
914
|
-
destination.
|
|
907
|
+
var this_0 = normalizeCards(this.v5t_1, tmp2_cards, this.w5t_1);
|
|
908
|
+
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
909
|
+
var _iterator__ex2g4s = this_0.l();
|
|
910
|
+
while (_iterator__ex2g4s.m()) {
|
|
911
|
+
var item = _iterator__ex2g4s.n();
|
|
912
|
+
destination.j(Companion_instance.t5s(item));
|
|
915
913
|
}
|
|
916
|
-
tmp_0.
|
|
917
|
-
this.
|
|
914
|
+
tmp_0.b5u_1 = destination;
|
|
915
|
+
this.r8_1 = 4;
|
|
918
916
|
continue $sm;
|
|
919
917
|
} else {
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
this.
|
|
923
|
-
this.
|
|
924
|
-
suspendResult = this.z6l_1.k6l(this.a6m_1, this.b6m_1, this.c6m_1, this.d6m_1, CardsRandomProvider_CUSTOM_getInstance(), this);
|
|
918
|
+
var exception = Result__exceptionOrNull_impl_p6xea9(result);
|
|
919
|
+
this.v5t_1.u5u_1.v('CardsDealerProvider', 'getRandomOrgCards: ' + (exception == null ? null : exception.message), exception);
|
|
920
|
+
this.r8_1 = 3;
|
|
921
|
+
suspendResult = this.v5t_1.g5t(this.w5t_1, this.x5t_1, this.y5t_1, this.z5t_1, CardsRandomProvider_CUSTOM_getInstance(), this);
|
|
925
922
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
926
923
|
return suspendResult;
|
|
927
924
|
}
|
|
@@ -929,51 +926,51 @@
|
|
|
929
926
|
}
|
|
930
927
|
|
|
931
928
|
case 3:
|
|
932
|
-
this.
|
|
933
|
-
this.
|
|
929
|
+
this.b5u_1 = suspendResult;
|
|
930
|
+
this.r8_1 = 4;
|
|
934
931
|
continue $sm;
|
|
935
932
|
case 4:
|
|
936
|
-
return this.
|
|
933
|
+
return this.b5u_1;
|
|
937
934
|
case 5:
|
|
938
|
-
throw this.
|
|
935
|
+
throw this.u8_1;
|
|
939
936
|
}
|
|
940
937
|
} catch ($p) {
|
|
941
938
|
var e = $p;
|
|
942
|
-
if (this.
|
|
939
|
+
if (this.s8_1 === 5) {
|
|
943
940
|
throw e;
|
|
944
941
|
} else {
|
|
945
|
-
this.
|
|
946
|
-
this.
|
|
942
|
+
this.r8_1 = this.s8_1;
|
|
943
|
+
this.u8_1 = e;
|
|
947
944
|
}
|
|
948
945
|
}
|
|
949
946
|
while (true);
|
|
950
947
|
};
|
|
951
948
|
function CardsDealerProviderImpl(random, randomPoolProvider, logger) {
|
|
952
|
-
this.
|
|
953
|
-
this.
|
|
954
|
-
this.
|
|
949
|
+
this.s5u_1 = random;
|
|
950
|
+
this.t5u_1 = randomPoolProvider;
|
|
951
|
+
this.u5u_1 = logger;
|
|
955
952
|
}
|
|
956
|
-
protoOf(CardsDealerProviderImpl).
|
|
953
|
+
protoOf(CardsDealerProviderImpl).f5t = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit) {
|
|
957
954
|
// Inline function 'kotlin.collections.flatMap' call
|
|
958
955
|
var tmp0 = get_entries();
|
|
959
956
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
960
957
|
var destination = ArrayList_init_$Create$();
|
|
961
|
-
var _iterator__ex2g4s = tmp0.
|
|
962
|
-
while (_iterator__ex2g4s.
|
|
963
|
-
var element = _iterator__ex2g4s.
|
|
958
|
+
var _iterator__ex2g4s = tmp0.l();
|
|
959
|
+
while (_iterator__ex2g4s.m()) {
|
|
960
|
+
var element = _iterator__ex2g4s.n();
|
|
964
961
|
// Inline function 'kotlin.collections.map' call
|
|
965
|
-
var this_0 = this.
|
|
962
|
+
var this_0 = this.v5u(leftCardIndexForEachSuit, rightCardIndexForEachSuit);
|
|
966
963
|
// Inline function 'kotlin.collections.mapTo' call
|
|
967
964
|
var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
968
|
-
var inductionVariable = this_0.
|
|
969
|
-
var last = this_0.
|
|
965
|
+
var inductionVariable = this_0.z_1;
|
|
966
|
+
var last = this_0.a1_1;
|
|
970
967
|
if (inductionVariable <= last)
|
|
971
968
|
do {
|
|
972
969
|
var item = inductionVariable;
|
|
973
970
|
inductionVariable = inductionVariable + 1 | 0;
|
|
974
971
|
var it = item;
|
|
975
|
-
var tmp$ret$0 = Companion_instance.
|
|
976
|
-
destination_0.
|
|
972
|
+
var tmp$ret$0 = Companion_instance.r5s(element, it);
|
|
973
|
+
destination_0.j(tmp$ret$0);
|
|
977
974
|
}
|
|
978
975
|
while (!(item === last));
|
|
979
976
|
var list = destination_0;
|
|
@@ -981,38 +978,38 @@
|
|
|
981
978
|
}
|
|
982
979
|
return destination;
|
|
983
980
|
};
|
|
984
|
-
protoOf(CardsDealerProviderImpl).
|
|
981
|
+
protoOf(CardsDealerProviderImpl).v5u = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit) {
|
|
985
982
|
return until(leftCardIndexForEachSuit, 13 - rightCardIndexForEachSuit | 0);
|
|
986
983
|
};
|
|
987
|
-
protoOf(CardsDealerProviderImpl).
|
|
984
|
+
protoOf(CardsDealerProviderImpl).m5t = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit) {
|
|
988
985
|
// Inline function 'kotlin.collections.sumOf' call
|
|
989
986
|
var sum = 0;
|
|
990
|
-
var _iterator__ex2g4s = get_entries().
|
|
991
|
-
while (_iterator__ex2g4s.
|
|
992
|
-
var element = _iterator__ex2g4s.
|
|
987
|
+
var _iterator__ex2g4s = get_entries().l();
|
|
988
|
+
while (_iterator__ex2g4s.m()) {
|
|
989
|
+
var element = _iterator__ex2g4s.n();
|
|
993
990
|
var tmp = sum;
|
|
994
|
-
sum = tmp + count(this.
|
|
991
|
+
sum = tmp + count(this.v5u(leftCardIndexForEachSuit, rightCardIndexForEachSuit)) | 0;
|
|
995
992
|
}
|
|
996
993
|
return sum;
|
|
997
994
|
};
|
|
998
|
-
protoOf(CardsDealerProviderImpl).
|
|
995
|
+
protoOf(CardsDealerProviderImpl).g5t = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundCountForGame, userData, provider, $completion) {
|
|
999
996
|
var tmp = new $createNewShuffledCardDeckCOROUTINE$(this, leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundCountForGame, userData, provider, $completion);
|
|
1000
|
-
tmp.
|
|
1001
|
-
tmp.
|
|
1002
|
-
return tmp.
|
|
997
|
+
tmp.t8_1 = Unit_instance;
|
|
998
|
+
tmp.u8_1 = null;
|
|
999
|
+
return tmp.z8();
|
|
1003
1000
|
};
|
|
1004
|
-
protoOf(CardsDealerProviderImpl).
|
|
1001
|
+
protoOf(CardsDealerProviderImpl).h5t = function (count, cards) {
|
|
1005
1002
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
1006
1003
|
// Inline function 'kotlin.apply' call
|
|
1007
1004
|
var this_0 = ArrayList_init_$Create$();
|
|
1008
1005
|
$l$block: {
|
|
1009
|
-
var _iterator__ex2g4s = cards.
|
|
1010
|
-
$l$loop_0: while (_iterator__ex2g4s.
|
|
1011
|
-
var card = _iterator__ex2g4s.
|
|
1012
|
-
if (this_0.
|
|
1006
|
+
var _iterator__ex2g4s = cards.l();
|
|
1007
|
+
$l$loop_0: while (_iterator__ex2g4s.m()) {
|
|
1008
|
+
var card = _iterator__ex2g4s.n();
|
|
1009
|
+
if (this_0.o() === count) {
|
|
1013
1010
|
break $l$block;
|
|
1014
1011
|
}
|
|
1015
|
-
var hasSimilarCard = this_0.
|
|
1012
|
+
var hasSimilarCard = this_0.t1(card);
|
|
1016
1013
|
if (hasSimilarCard) {
|
|
1017
1014
|
continue $l$loop_0;
|
|
1018
1015
|
}
|
|
@@ -1021,7 +1018,7 @@
|
|
|
1021
1018
|
// Inline function 'kotlin.collections.any' call
|
|
1022
1019
|
var tmp;
|
|
1023
1020
|
if (isInterface(this_0, Collection)) {
|
|
1024
|
-
tmp = this_0.
|
|
1021
|
+
tmp = this_0.q();
|
|
1025
1022
|
} else {
|
|
1026
1023
|
tmp = false;
|
|
1027
1024
|
}
|
|
@@ -1029,10 +1026,10 @@
|
|
|
1029
1026
|
tmp$ret$2 = false;
|
|
1030
1027
|
break $l$block_1;
|
|
1031
1028
|
}
|
|
1032
|
-
var _iterator__ex2g4s_0 = this_0.
|
|
1033
|
-
while (_iterator__ex2g4s_0.
|
|
1034
|
-
var element = _iterator__ex2g4s_0.
|
|
1035
|
-
if (element.
|
|
1029
|
+
var _iterator__ex2g4s_0 = this_0.l();
|
|
1030
|
+
while (_iterator__ex2g4s_0.m()) {
|
|
1031
|
+
var element = _iterator__ex2g4s_0.n();
|
|
1032
|
+
if (element.q5s() === card.q5s()) {
|
|
1036
1033
|
tmp$ret$2 = true;
|
|
1037
1034
|
break $l$block_1;
|
|
1038
1035
|
}
|
|
@@ -1042,12 +1039,12 @@
|
|
|
1042
1039
|
if (tmp$ret$2) {
|
|
1043
1040
|
continue $l$loop_0;
|
|
1044
1041
|
}
|
|
1045
|
-
this_0.
|
|
1042
|
+
this_0.j(card);
|
|
1046
1043
|
}
|
|
1047
1044
|
}
|
|
1048
1045
|
return this_0;
|
|
1049
1046
|
};
|
|
1050
|
-
protoOf(CardsDealerProviderImpl).
|
|
1047
|
+
protoOf(CardsDealerProviderImpl).i5t = function (cards, times) {
|
|
1051
1048
|
// Inline function 'kotlin.let' call
|
|
1052
1049
|
var shuffled = toMutableList(cards);
|
|
1053
1050
|
var inductionVariable = 0;
|
|
@@ -1055,72 +1052,72 @@
|
|
|
1055
1052
|
do {
|
|
1056
1053
|
var i = inductionVariable;
|
|
1057
1054
|
inductionVariable = inductionVariable + 1 | 0;
|
|
1058
|
-
shuffled = this.
|
|
1055
|
+
shuffled = this.s5u_1.j5s(shuffled);
|
|
1059
1056
|
}
|
|
1060
1057
|
while (inductionVariable < times);
|
|
1061
1058
|
return shuffled;
|
|
1062
1059
|
};
|
|
1063
|
-
protoOf(CardsDealerProviderImpl).
|
|
1064
|
-
return toList(overhand(riffle(toMutableList(cards), times, this.
|
|
1060
|
+
protoOf(CardsDealerProviderImpl).k5t = function (cards, times) {
|
|
1061
|
+
return toList(overhand(riffle(toMutableList(cards), times, this.s5u_1), times, this.s5u_1));
|
|
1065
1062
|
};
|
|
1066
1063
|
function Companion_3() {
|
|
1067
1064
|
}
|
|
1068
|
-
protoOf(Companion_3).
|
|
1065
|
+
protoOf(Companion_3).w5u = function () {
|
|
1069
1066
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
1070
1067
|
// Inline function 'kotlin.apply' call
|
|
1071
1068
|
var this_0 = ArrayList_init_$Create$();
|
|
1072
|
-
this_0.
|
|
1073
|
-
this_0.
|
|
1074
|
-
this_0.
|
|
1075
|
-
this_0.
|
|
1076
|
-
this_0.
|
|
1069
|
+
this_0.r(listOf([Companion_instance.s5s(Suit_DIAMOND_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.s5s(Suit_CLUB_getInstance(), CardName_NINE_getInstance()), Companion_instance.s5s(Suit_CLUB_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.s5s(Suit_CLUB_getInstance(), CardName_TEN_getInstance()), Companion_instance.s5s(Suit_HEART_getInstance(), CardName_JACK_getInstance()), Companion_instance.s5s(Suit_HEART_getInstance(), CardName_KING_getInstance())]));
|
|
1070
|
+
this_0.r(listOf([Companion_instance.s5s(Suit_CLUB_getInstance(), CardName_JACK_getInstance()), Companion_instance.s5s(Suit_SPADE_getInstance(), CardName_ACE_getInstance()), Companion_instance.s5s(Suit_DIAMOND_getInstance(), CardName_NINE_getInstance()), Companion_instance.s5s(Suit_DIAMOND_getInstance(), CardName_TEN_getInstance()), Companion_instance.s5s(Suit_DIAMOND_getInstance(), CardName_JACK_getInstance()), Companion_instance.s5s(Suit_HEART_getInstance(), CardName_EIGHT_getInstance())]));
|
|
1071
|
+
this_0.r(listOf([Companion_instance.s5s(Suit_CLUB_getInstance(), CardName_QUEEN_getInstance()), Companion_instance.s5s(Suit_HEART_getInstance(), CardName_ACE_getInstance()), Companion_instance.s5s(Suit_HEART_getInstance(), CardName_QUEEN_getInstance()), Companion_instance.s5s(Suit_HEART_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.s5s(Suit_SPADE_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.s5s(Suit_CLUB_getInstance(), CardName_KING_getInstance())]));
|
|
1072
|
+
this_0.r(listOf([Companion_instance.s5s(Suit_SPADE_getInstance(), CardName_EIGHT_getInstance()), Companion_instance.s5s(Suit_SPADE_getInstance(), CardName_TEN_getInstance()), Companion_instance.s5s(Suit_HEART_getInstance(), CardName_TEN_getInstance()), Companion_instance.s5s(Suit_SPADE_getInstance(), CardName_JACK_getInstance()), Companion_instance.s5s(Suit_DIAMOND_getInstance(), CardName_EIGHT_getInstance()), Companion_instance.s5s(Suit_SPADE_getInstance(), CardName_QUEEN_getInstance())]));
|
|
1073
|
+
this_0.r(listOf([Companion_instance.s5s(Suit_DIAMOND_getInstance(), CardName_ACE_getInstance()), Companion_instance.s5s(Suit_CLUB_getInstance(), CardName_EIGHT_getInstance()), Companion_instance.s5s(Suit_DIAMOND_getInstance(), CardName_KING_getInstance()), Companion_instance.s5s(Suit_SPADE_getInstance(), CardName_NINE_getInstance()), Companion_instance.s5s(Suit_CLUB_getInstance(), CardName_ACE_getInstance()), Companion_instance.s5s(Suit_SPADE_getInstance(), CardName_KING_getInstance()), Companion_instance.s5s(Suit_DIAMOND_getInstance(), CardName_QUEEN_getInstance()), Companion_instance.s5s(Suit_HEART_getInstance(), CardName_NINE_getInstance())]));
|
|
1077
1074
|
return this_0;
|
|
1078
1075
|
};
|
|
1079
|
-
protoOf(Companion_3).
|
|
1080
|
-
return listOf([Companion_instance.
|
|
1076
|
+
protoOf(Companion_3).x5u = function () {
|
|
1077
|
+
return listOf([Companion_instance.s5s(Suit_CLUB_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.s5s(Suit_HEART_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.s5s(Suit_SPADE_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.s5s(Suit_SPADE_getInstance(), CardName_EIGHT_getInstance())]);
|
|
1081
1078
|
};
|
|
1082
1079
|
var Companion_instance_3;
|
|
1083
1080
|
function Companion_getInstance_3() {
|
|
1084
1081
|
return Companion_instance_3;
|
|
1085
1082
|
}
|
|
1086
1083
|
function FakeCardsDealerProvider(cards, cardsForLot) {
|
|
1087
|
-
cards = cards === VOID ? Companion_instance_3.
|
|
1088
|
-
cardsForLot = cardsForLot === VOID ? Companion_instance_3.
|
|
1089
|
-
this.
|
|
1090
|
-
this.
|
|
1084
|
+
cards = cards === VOID ? Companion_instance_3.w5u() : cards;
|
|
1085
|
+
cardsForLot = cardsForLot === VOID ? Companion_instance_3.x5u() : cardsForLot;
|
|
1086
|
+
this.y5u_1 = cards;
|
|
1087
|
+
this.z5u_1 = cardsForLot;
|
|
1091
1088
|
}
|
|
1092
|
-
protoOf(FakeCardsDealerProvider).
|
|
1093
|
-
return this.
|
|
1089
|
+
protoOf(FakeCardsDealerProvider).f5t = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit) {
|
|
1090
|
+
return this.y5u_1;
|
|
1094
1091
|
};
|
|
1095
|
-
protoOf(FakeCardsDealerProvider).
|
|
1096
|
-
return this.
|
|
1092
|
+
protoOf(FakeCardsDealerProvider).g5t = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundCountForGame, userData, provider, $completion) {
|
|
1093
|
+
return this.y5u_1;
|
|
1097
1094
|
};
|
|
1098
|
-
protoOf(FakeCardsDealerProvider).
|
|
1099
|
-
return this.
|
|
1095
|
+
protoOf(FakeCardsDealerProvider).h5t = function (count, cards) {
|
|
1096
|
+
return this.z5u_1;
|
|
1100
1097
|
};
|
|
1101
|
-
protoOf(FakeCardsDealerProvider).
|
|
1098
|
+
protoOf(FakeCardsDealerProvider).i5t = function (cards, times) {
|
|
1102
1099
|
return cards;
|
|
1103
1100
|
};
|
|
1104
|
-
protoOf(FakeCardsDealerProvider).
|
|
1101
|
+
protoOf(FakeCardsDealerProvider).k5t = function (cards, times) {
|
|
1105
1102
|
return cards;
|
|
1106
1103
|
};
|
|
1107
|
-
protoOf(FakeCardsDealerProvider).
|
|
1108
|
-
return this.
|
|
1104
|
+
protoOf(FakeCardsDealerProvider).m5t = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit) {
|
|
1105
|
+
return this.y5u_1.o();
|
|
1109
1106
|
};
|
|
1110
1107
|
function CombinationsCheckerProvider() {
|
|
1111
1108
|
}
|
|
1112
1109
|
function createCombination($this, cards, supportedCombinations) {
|
|
1113
|
-
var size = cards.
|
|
1114
|
-
if (supportedCombinations.
|
|
1110
|
+
var size = cards.o();
|
|
1111
|
+
if (supportedCombinations.t1(size)) {
|
|
1115
1112
|
return cards;
|
|
1116
1113
|
}
|
|
1117
1114
|
var fromLongestCombinations = asReversed(sorted(supportedCombinations));
|
|
1118
1115
|
var tmp$ret$1;
|
|
1119
1116
|
$l$block: {
|
|
1120
1117
|
// Inline function 'kotlin.collections.first' call
|
|
1121
|
-
var _iterator__ex2g4s = fromLongestCombinations.
|
|
1122
|
-
while (_iterator__ex2g4s.
|
|
1123
|
-
var element = _iterator__ex2g4s.
|
|
1118
|
+
var _iterator__ex2g4s = fromLongestCombinations.l();
|
|
1119
|
+
while (_iterator__ex2g4s.m()) {
|
|
1120
|
+
var element = _iterator__ex2g4s.n();
|
|
1124
1121
|
if (element <= size) {
|
|
1125
1122
|
tmp$ret$1 = element;
|
|
1126
1123
|
break $l$block;
|
|
@@ -1132,23 +1129,23 @@
|
|
|
1132
1129
|
return takeLast(cards, longestCombinationSupport);
|
|
1133
1130
|
}
|
|
1134
1131
|
function sam$kotlin_Comparator$0(function_0) {
|
|
1135
|
-
this.
|
|
1132
|
+
this.f5v_1 = function_0;
|
|
1136
1133
|
}
|
|
1137
|
-
protoOf(sam$kotlin_Comparator$0).
|
|
1138
|
-
return this.
|
|
1134
|
+
protoOf(sam$kotlin_Comparator$0).ec = function (a, b) {
|
|
1135
|
+
return this.f5v_1(a, b);
|
|
1139
1136
|
};
|
|
1140
1137
|
protoOf(sam$kotlin_Comparator$0).compare = function (a, b) {
|
|
1141
|
-
return this.
|
|
1138
|
+
return this.ec(a, b);
|
|
1142
1139
|
};
|
|
1143
|
-
protoOf(sam$kotlin_Comparator$0).
|
|
1144
|
-
return this.
|
|
1140
|
+
protoOf(sam$kotlin_Comparator$0).a3 = function () {
|
|
1141
|
+
return this.f5v_1;
|
|
1145
1142
|
};
|
|
1146
1143
|
protoOf(sam$kotlin_Comparator$0).equals = function (other) {
|
|
1147
1144
|
var tmp;
|
|
1148
1145
|
if (!(other == null) ? isInterface(other, Comparator) : false) {
|
|
1149
1146
|
var tmp_0;
|
|
1150
1147
|
if (!(other == null) ? isInterface(other, FunctionAdapter) : false) {
|
|
1151
|
-
tmp_0 = equals(this.
|
|
1148
|
+
tmp_0 = equals(this.a3(), other.a3());
|
|
1152
1149
|
} else {
|
|
1153
1150
|
tmp_0 = false;
|
|
1154
1151
|
}
|
|
@@ -1159,28 +1156,28 @@
|
|
|
1159
1156
|
return tmp;
|
|
1160
1157
|
};
|
|
1161
1158
|
protoOf(sam$kotlin_Comparator$0).hashCode = function () {
|
|
1162
|
-
return hashCode(this.
|
|
1159
|
+
return hashCode(this.a3());
|
|
1163
1160
|
};
|
|
1164
1161
|
function CombinationsCheckerProviderImpl$createCombinationsFromCardsInRow$lambda(a, b) {
|
|
1165
1162
|
// Inline function 'kotlin.comparisons.compareValuesBy' call
|
|
1166
|
-
var tmp = first_0(a).
|
|
1167
|
-
var tmp$ret$1 = first_0(b).
|
|
1163
|
+
var tmp = first_0(a).n5s_1;
|
|
1164
|
+
var tmp$ret$1 = first_0(b).n5s_1;
|
|
1168
1165
|
return compareValues(tmp, tmp$ret$1);
|
|
1169
1166
|
}
|
|
1170
1167
|
function CombinationsCheckerProviderImpl() {
|
|
1171
1168
|
}
|
|
1172
|
-
protoOf(CombinationsCheckerProviderImpl).
|
|
1169
|
+
protoOf(CombinationsCheckerProviderImpl).a5v = function (cards, supportedCombinations, checkFromIndex, includeCardNames, suit) {
|
|
1173
1170
|
// Inline function 'kotlin.apply' call
|
|
1174
1171
|
var this_0 = toMutableList(cards);
|
|
1175
1172
|
sortWith(this_0, CardIndexComparator_instance);
|
|
1176
1173
|
// Inline function 'kotlin.collections.filter' call
|
|
1177
1174
|
// Inline function 'kotlin.collections.filterTo' call
|
|
1178
1175
|
var destination = ArrayList_init_$Create$();
|
|
1179
|
-
var _iterator__ex2g4s = this_0.
|
|
1180
|
-
while (_iterator__ex2g4s.
|
|
1181
|
-
var element = _iterator__ex2g4s.
|
|
1182
|
-
if (element.
|
|
1183
|
-
destination.
|
|
1176
|
+
var _iterator__ex2g4s = this_0.l();
|
|
1177
|
+
while (_iterator__ex2g4s.m()) {
|
|
1178
|
+
var element = _iterator__ex2g4s.n();
|
|
1179
|
+
if (element.o5s()) {
|
|
1180
|
+
destination.j(element);
|
|
1184
1181
|
}
|
|
1185
1182
|
}
|
|
1186
1183
|
var sortedByIndexCards = toList(destination);
|
|
@@ -1189,110 +1186,110 @@
|
|
|
1189
1186
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
1190
1187
|
var combinationCards = ArrayList_init_$Create$();
|
|
1191
1188
|
var inductionVariable = 0;
|
|
1192
|
-
var last = sortedByIndexCards.
|
|
1189
|
+
var last = sortedByIndexCards.o() - 1 | 0;
|
|
1193
1190
|
if (inductionVariable <= last)
|
|
1194
1191
|
do {
|
|
1195
1192
|
var i = inductionVariable;
|
|
1196
1193
|
inductionVariable = inductionVariable + 1 | 0;
|
|
1197
1194
|
var previousCard = lastOrNull(combinationCards);
|
|
1198
|
-
var currentCard = sortedByIndexCards.
|
|
1199
|
-
var isNextInRow = !(previousCard == null) && currentCard.
|
|
1200
|
-
var passedCardNamesCheck = includeCardNames == null || includeCardNames.
|
|
1201
|
-
var passedSuitCheck = suit == null || currentCard.
|
|
1195
|
+
var currentCard = sortedByIndexCards.p(i);
|
|
1196
|
+
var isNextInRow = !(previousCard == null) && currentCard.n5s_1 === (previousCard.n5s_1 + 1 | 0) && currentCard.p5s().equals(previousCard.p5s());
|
|
1197
|
+
var passedCardNamesCheck = includeCardNames == null || includeCardNames.t1(currentCard.q2());
|
|
1198
|
+
var passedSuitCheck = suit == null || currentCard.p5s().equals(suit);
|
|
1202
1199
|
if (isNextInRow && passedSuitCheck && passedCardNamesCheck) {
|
|
1203
|
-
combinationCards.
|
|
1200
|
+
combinationCards.j(currentCard);
|
|
1204
1201
|
} else {
|
|
1205
|
-
if (combinationCards.
|
|
1206
|
-
combinations.
|
|
1202
|
+
if (combinationCards.o() > (checkFromIndex - 1 | 0)) {
|
|
1203
|
+
combinations.r(this.e5v(toMutableList(combinationCards), supportedCombinations));
|
|
1207
1204
|
}
|
|
1208
|
-
combinationCards.
|
|
1205
|
+
combinationCards.h2();
|
|
1209
1206
|
if (passedSuitCheck && passedCardNamesCheck) {
|
|
1210
|
-
combinationCards.
|
|
1207
|
+
combinationCards.j(currentCard);
|
|
1211
1208
|
}
|
|
1212
1209
|
}
|
|
1213
1210
|
}
|
|
1214
1211
|
while (inductionVariable <= last);
|
|
1215
|
-
if (combinationCards.
|
|
1216
|
-
combinations.
|
|
1212
|
+
if (combinationCards.o() > (checkFromIndex - 1 | 0)) {
|
|
1213
|
+
combinations.r(this.e5v(toMutableList(combinationCards), supportedCombinations));
|
|
1217
1214
|
}
|
|
1218
1215
|
return combinations;
|
|
1219
1216
|
};
|
|
1220
|
-
protoOf(CombinationsCheckerProviderImpl).
|
|
1217
|
+
protoOf(CombinationsCheckerProviderImpl).c5v = function (cards, cardsCount, includeCardNames) {
|
|
1221
1218
|
// Inline function 'kotlin.apply' call
|
|
1222
1219
|
var this_0 = toMutableList(cards);
|
|
1223
1220
|
sortWith(this_0, CardIndexComparator_instance);
|
|
1224
1221
|
// Inline function 'kotlin.collections.filter' call
|
|
1225
1222
|
// Inline function 'kotlin.collections.filterTo' call
|
|
1226
1223
|
var destination = ArrayList_init_$Create$();
|
|
1227
|
-
var _iterator__ex2g4s = this_0.
|
|
1228
|
-
while (_iterator__ex2g4s.
|
|
1229
|
-
var element = _iterator__ex2g4s.
|
|
1230
|
-
if (element.
|
|
1231
|
-
destination.
|
|
1224
|
+
var _iterator__ex2g4s = this_0.l();
|
|
1225
|
+
while (_iterator__ex2g4s.m()) {
|
|
1226
|
+
var element = _iterator__ex2g4s.n();
|
|
1227
|
+
if (element.o5s()) {
|
|
1228
|
+
destination.j(element);
|
|
1232
1229
|
}
|
|
1233
1230
|
}
|
|
1234
1231
|
// Inline function 'kotlin.collections.filter' call
|
|
1235
1232
|
// Inline function 'kotlin.collections.filterTo' call
|
|
1236
1233
|
var destination_0 = ArrayList_init_$Create$();
|
|
1237
|
-
var _iterator__ex2g4s_0 = destination.
|
|
1238
|
-
while (_iterator__ex2g4s_0.
|
|
1239
|
-
var element_0 = _iterator__ex2g4s_0.
|
|
1240
|
-
if (includeCardNames == null || includeCardNames.
|
|
1241
|
-
destination_0.
|
|
1234
|
+
var _iterator__ex2g4s_0 = destination.l();
|
|
1235
|
+
while (_iterator__ex2g4s_0.m()) {
|
|
1236
|
+
var element_0 = _iterator__ex2g4s_0.n();
|
|
1237
|
+
if (includeCardNames == null || includeCardNames.t1(element_0.q2())) {
|
|
1238
|
+
destination_0.j(element_0);
|
|
1242
1239
|
}
|
|
1243
1240
|
}
|
|
1244
1241
|
var sortedByNumberCards = toList(destination_0);
|
|
1245
1242
|
// Inline function 'kotlin.collections.groupBy' call
|
|
1246
1243
|
// Inline function 'kotlin.collections.groupByTo' call
|
|
1247
1244
|
var destination_1 = LinkedHashMap_init_$Create$();
|
|
1248
|
-
var _iterator__ex2g4s_1 = sortedByNumberCards.
|
|
1249
|
-
while (_iterator__ex2g4s_1.
|
|
1250
|
-
var element_1 = _iterator__ex2g4s_1.
|
|
1251
|
-
var key = element_1.
|
|
1245
|
+
var _iterator__ex2g4s_1 = sortedByNumberCards.l();
|
|
1246
|
+
while (_iterator__ex2g4s_1.m()) {
|
|
1247
|
+
var element_1 = _iterator__ex2g4s_1.n();
|
|
1248
|
+
var key = element_1.q5s();
|
|
1252
1249
|
// Inline function 'kotlin.collections.getOrPut' call
|
|
1253
|
-
var value = destination_1.
|
|
1250
|
+
var value = destination_1.b2(key);
|
|
1254
1251
|
var tmp;
|
|
1255
1252
|
if (value == null) {
|
|
1256
1253
|
var answer = ArrayList_init_$Create$();
|
|
1257
|
-
destination_1.
|
|
1254
|
+
destination_1.l2(key, answer);
|
|
1258
1255
|
tmp = answer;
|
|
1259
1256
|
} else {
|
|
1260
1257
|
tmp = value;
|
|
1261
1258
|
}
|
|
1262
1259
|
var list = tmp;
|
|
1263
|
-
list.
|
|
1260
|
+
list.j(element_1);
|
|
1264
1261
|
}
|
|
1265
1262
|
// Inline function 'kotlin.collections.filter' call
|
|
1266
1263
|
// Inline function 'kotlin.collections.filterTo' call
|
|
1267
1264
|
var destination_2 = LinkedHashMap_init_$Create$();
|
|
1268
1265
|
// Inline function 'kotlin.collections.iterator' call
|
|
1269
|
-
var _iterator__ex2g4s_2 = destination_1.
|
|
1270
|
-
while (_iterator__ex2g4s_2.
|
|
1271
|
-
var element_2 = _iterator__ex2g4s_2.
|
|
1272
|
-
if (element_2.
|
|
1273
|
-
destination_2.
|
|
1266
|
+
var _iterator__ex2g4s_2 = destination_1.u().l();
|
|
1267
|
+
while (_iterator__ex2g4s_2.m()) {
|
|
1268
|
+
var element_2 = _iterator__ex2g4s_2.n();
|
|
1269
|
+
if (element_2.w().o() >= cardsCount) {
|
|
1270
|
+
destination_2.l2(element_2.v(), element_2.w());
|
|
1274
1271
|
}
|
|
1275
1272
|
}
|
|
1276
|
-
var combinations = destination_2.
|
|
1273
|
+
var combinations = destination_2.d2();
|
|
1277
1274
|
// Inline function 'kotlin.collections.map' call
|
|
1278
1275
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1279
1276
|
var destination_3 = ArrayList_init_$Create$_0(collectionSizeOrDefault(combinations, 10));
|
|
1280
|
-
var _iterator__ex2g4s_3 = combinations.
|
|
1281
|
-
while (_iterator__ex2g4s_3.
|
|
1282
|
-
var item = _iterator__ex2g4s_3.
|
|
1277
|
+
var _iterator__ex2g4s_3 = combinations.l();
|
|
1278
|
+
while (_iterator__ex2g4s_3.m()) {
|
|
1279
|
+
var item = _iterator__ex2g4s_3.n();
|
|
1283
1280
|
var tmp$ret$17 = sortedWith(item, CardIndexComparator_instance);
|
|
1284
|
-
destination_3.
|
|
1281
|
+
destination_3.j(tmp$ret$17);
|
|
1285
1282
|
}
|
|
1286
1283
|
return destination_3;
|
|
1287
1284
|
};
|
|
1288
|
-
protoOf(CombinationsCheckerProviderImpl).
|
|
1285
|
+
protoOf(CombinationsCheckerProviderImpl).e5v = function (cards, supportedCombinations) {
|
|
1289
1286
|
// Inline function 'kotlin.collections.minOf' call
|
|
1290
|
-
var iterator = supportedCombinations.
|
|
1291
|
-
if (!iterator.
|
|
1287
|
+
var iterator = supportedCombinations.l();
|
|
1288
|
+
if (!iterator.m())
|
|
1292
1289
|
throw NoSuchElementException_init_$Create$_0();
|
|
1293
|
-
var minValue = iterator.
|
|
1294
|
-
while (iterator.
|
|
1295
|
-
var v = iterator.
|
|
1290
|
+
var minValue = iterator.n();
|
|
1291
|
+
while (iterator.m()) {
|
|
1292
|
+
var v = iterator.n();
|
|
1296
1293
|
if (compareTo(minValue, v) > 0) {
|
|
1297
1294
|
minValue = v;
|
|
1298
1295
|
}
|
|
@@ -1301,10 +1298,10 @@
|
|
|
1301
1298
|
var cardsToCheck = toMutableList(cards);
|
|
1302
1299
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
1303
1300
|
var combinations = ArrayList_init_$Create$();
|
|
1304
|
-
while (cardsToCheck.
|
|
1301
|
+
while (cardsToCheck.o() >= shortestCombinationSupport) {
|
|
1305
1302
|
var combinationCards = createCombination(this, cardsToCheck, supportedCombinations);
|
|
1306
|
-
combinations.
|
|
1307
|
-
cardsToCheck.
|
|
1303
|
+
combinations.j(toList(combinationCards));
|
|
1304
|
+
cardsToCheck.g2(combinationCards);
|
|
1308
1305
|
}
|
|
1309
1306
|
// Inline function 'kotlin.collections.sortedBy' call
|
|
1310
1307
|
// Inline function 'kotlin.comparisons.compareBy' call
|
|
@@ -1315,79 +1312,79 @@
|
|
|
1315
1312
|
function DealerReducer() {
|
|
1316
1313
|
}
|
|
1317
1314
|
function DealerReducerImpl(logger, enableLogs) {
|
|
1318
|
-
this.
|
|
1319
|
-
this.
|
|
1315
|
+
this.j5v_1 = logger;
|
|
1316
|
+
this.k5v_1 = enableLogs;
|
|
1320
1317
|
}
|
|
1321
|
-
protoOf(DealerReducerImpl).
|
|
1318
|
+
protoOf(DealerReducerImpl).g5v = function (cards, cardsToRemove) {
|
|
1322
1319
|
var list = cards;
|
|
1323
|
-
var _iterator__ex2g4s = cardsToRemove.
|
|
1324
|
-
while (_iterator__ex2g4s.
|
|
1325
|
-
var gameCard = _iterator__ex2g4s.
|
|
1326
|
-
list = this.
|
|
1320
|
+
var _iterator__ex2g4s = cardsToRemove.l();
|
|
1321
|
+
while (_iterator__ex2g4s.m()) {
|
|
1322
|
+
var gameCard = _iterator__ex2g4s.n();
|
|
1323
|
+
list = this.h5v(list, gameCard);
|
|
1327
1324
|
}
|
|
1328
1325
|
return list;
|
|
1329
1326
|
};
|
|
1330
|
-
protoOf(DealerReducerImpl).
|
|
1327
|
+
protoOf(DealerReducerImpl).h5v = function (cards, cardToRemove) {
|
|
1331
1328
|
var tmp;
|
|
1332
|
-
if (!cardToRemove.
|
|
1333
|
-
if (this.
|
|
1334
|
-
this.
|
|
1329
|
+
if (!cardToRemove.v5s() && cards.t1(cardToRemove)) {
|
|
1330
|
+
if (this.k5v_1) {
|
|
1331
|
+
this.j5v_1.d('Dealer', 'Card removed: ' + cardToRemove.toString() + ', size: ' + (cards.o() - 1 | 0));
|
|
1335
1332
|
}
|
|
1336
1333
|
tmp = minus(cards, cardToRemove);
|
|
1337
1334
|
} else {
|
|
1338
|
-
if (this.
|
|
1339
|
-
this.
|
|
1335
|
+
if (this.k5v_1) {
|
|
1336
|
+
this.j5v_1.d('Dealer', 'Card removed as hidden: ' + cardToRemove.toString() + ', size: ' + (cards.o() - 1 | 0));
|
|
1340
1337
|
}
|
|
1341
1338
|
// Inline function 'kotlin.collections.filterNot' call
|
|
1342
1339
|
// Inline function 'kotlin.collections.filterNotTo' call
|
|
1343
1340
|
var destination = ArrayList_init_$Create$();
|
|
1344
|
-
var _iterator__ex2g4s = cards.
|
|
1345
|
-
while (_iterator__ex2g4s.
|
|
1346
|
-
var element = _iterator__ex2g4s.
|
|
1347
|
-
if (!element.
|
|
1348
|
-
destination.
|
|
1341
|
+
var _iterator__ex2g4s = cards.l();
|
|
1342
|
+
while (_iterator__ex2g4s.m()) {
|
|
1343
|
+
var element = _iterator__ex2g4s.n();
|
|
1344
|
+
if (!element.v5s()) {
|
|
1345
|
+
destination.j(element);
|
|
1349
1346
|
}
|
|
1350
1347
|
}
|
|
1351
1348
|
var notHiddenCards = destination;
|
|
1352
1349
|
// Inline function 'kotlin.collections.filter' call
|
|
1353
1350
|
// Inline function 'kotlin.collections.filterTo' call
|
|
1354
1351
|
var destination_0 = ArrayList_init_$Create$();
|
|
1355
|
-
var _iterator__ex2g4s_0 = cards.
|
|
1356
|
-
while (_iterator__ex2g4s_0.
|
|
1357
|
-
var element_0 = _iterator__ex2g4s_0.
|
|
1358
|
-
if (element_0.
|
|
1359
|
-
destination_0.
|
|
1352
|
+
var _iterator__ex2g4s_0 = cards.l();
|
|
1353
|
+
while (_iterator__ex2g4s_0.m()) {
|
|
1354
|
+
var element_0 = _iterator__ex2g4s_0.n();
|
|
1355
|
+
if (element_0.v5s()) {
|
|
1356
|
+
destination_0.j(element_0);
|
|
1360
1357
|
}
|
|
1361
1358
|
}
|
|
1362
1359
|
var hiddenCards = destination_0;
|
|
1363
|
-
if (hiddenCards.
|
|
1364
|
-
this.
|
|
1360
|
+
if (hiddenCards.q()) {
|
|
1361
|
+
this.j5v_1.w('Dealer', "Can't find card to delete for player, " + ('cards:' + toString(cards) + ', ') + ('cardToRemove: ' + cardToRemove.toString()));
|
|
1365
1362
|
}
|
|
1366
1363
|
tmp = plus(notHiddenCards, dropLast(hiddenCards, 1));
|
|
1367
1364
|
}
|
|
1368
1365
|
return tmp;
|
|
1369
1366
|
};
|
|
1370
|
-
protoOf(DealerReducerImpl).
|
|
1371
|
-
if (this.
|
|
1372
|
-
this.
|
|
1367
|
+
protoOf(DealerReducerImpl).i5v = function (cards, cardToAdd) {
|
|
1368
|
+
if (this.k5v_1) {
|
|
1369
|
+
this.j5v_1.d('Dealer', 'Card added: ' + cardToAdd.toString() + ', size: ' + (cards.o() + 1 | 0));
|
|
1373
1370
|
}
|
|
1374
|
-
if (cards.
|
|
1375
|
-
this.
|
|
1371
|
+
if (cards.t1(cardToAdd)) {
|
|
1372
|
+
this.j5v_1.w('Dealer', 'Card already exists for player, ' + ('cards:' + toString(cards) + ', ') + ('cardToAdd: ' + cardToAdd.toString()));
|
|
1376
1373
|
}
|
|
1377
1374
|
return plus_0(cards, cardToAdd);
|
|
1378
1375
|
};
|
|
1379
1376
|
//region block: post-declaration
|
|
1380
|
-
protoOf(CardsDealerProviderImpl).
|
|
1381
|
-
protoOf(CardsDealerProviderImpl).
|
|
1382
|
-
protoOf(FakeCardsDealerProvider).
|
|
1383
|
-
protoOf(FakeCardsDealerProvider).
|
|
1384
|
-
protoOf(CombinationsCheckerProviderImpl).
|
|
1385
|
-
protoOf(CombinationsCheckerProviderImpl).
|
|
1377
|
+
protoOf(CardsDealerProviderImpl).j5t = standardShuffledCards$default;
|
|
1378
|
+
protoOf(CardsDealerProviderImpl).l5t = realLifeShuffledCards$default;
|
|
1379
|
+
protoOf(FakeCardsDealerProvider).j5t = standardShuffledCards$default;
|
|
1380
|
+
protoOf(FakeCardsDealerProvider).l5t = realLifeShuffledCards$default;
|
|
1381
|
+
protoOf(CombinationsCheckerProviderImpl).b5v = findCardsInRowCombinations$default;
|
|
1382
|
+
protoOf(CombinationsCheckerProviderImpl).d5v = findSameCardsNumberCombinations$default;
|
|
1386
1383
|
//endregion
|
|
1387
1384
|
//region block: init
|
|
1388
1385
|
CoreConfig_instance = new CoreConfig();
|
|
1389
|
-
CardIndexComparator_instance = new CardIndexComparator();
|
|
1390
1386
|
CardNumberComparator_instance = new CardNumberComparator();
|
|
1387
|
+
CardIndexComparator_instance = new CardIndexComparator();
|
|
1391
1388
|
Companion_instance = new Companion();
|
|
1392
1389
|
Companion_instance_0 = new Companion_0();
|
|
1393
1390
|
Companion_instance_2 = new Companion_2();
|
|
@@ -1399,7 +1396,7 @@
|
|
|
1399
1396
|
var $io$raspberryapps = $io.raspberryapps || ($io.raspberryapps = {});
|
|
1400
1397
|
var $io$raspberryapps$cardgame = $io$raspberryapps.cardgame || ($io$raspberryapps.cardgame = {});
|
|
1401
1398
|
var $io$raspberryapps$cardgame$core = $io$raspberryapps$cardgame.core || ($io$raspberryapps$cardgame.core = {});
|
|
1402
|
-
defineProp($io$raspberryapps$cardgame$core, 'CoreConfig', CoreConfig_getInstance);
|
|
1399
|
+
defineProp($io$raspberryapps$cardgame$core, 'CoreConfig', CoreConfig_getInstance, VOID, true);
|
|
1403
1400
|
}
|
|
1404
1401
|
$jsExportAll$(_);
|
|
1405
1402
|
_.$jsExportAll$ = $jsExportAll$;
|