game_client_logic_deb 1.8.305 → 1.8.314
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 +78 -78
- package/Kosi-Kodein-kodein-di.js +647 -647
- package/Kotlin-DateTime-library-kotlinx-datetime.js +1508 -1508
- package/Logic_Debertz-core.js +2240 -2211
- package/Logic_Debertz-core.js.map +1 -1
- package/Logic_Debertz-engine.js +15420 -15313
- package/Logic_Debertz-engine.js.map +1 -1
- package/Logic_Debertz-game_client.d.ts +22 -15
- package/Logic_Debertz-game_client.js +5382 -4785
- package/Logic_Debertz-game_client.js.map +1 -1
- package/kotlin-kotlin-stdlib.js +2877 -2635
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kotlinx-atomicfu.js +25 -25
- package/kotlinx-coroutines-core.js +2851 -2851
- package/kotlinx-coroutines-core.js.map +1 -1
- package/kotlinx-io-kotlinx-io-core.js +362 -362
- package/kotlinx-serialization-kotlinx-serialization-core.js +2038 -2038
- package/kotlinx-serialization-kotlinx-serialization-json.js +1569 -1569
- package/ktor-ktor-client-content-negotiation.js +219 -219
- package/ktor-ktor-client-core.js +2528 -2528
- package/ktor-ktor-client-logging.js +553 -553
- package/ktor-ktor-events.js +12 -12
- package/ktor-ktor-http.js +762 -762
- package/ktor-ktor-io.js +1659 -1659
- package/ktor-ktor-serialization-kotlinx-json.js +7 -7
- package/ktor-ktor-serialization-kotlinx.js +271 -271
- package/ktor-ktor-serialization.js +130 -130
- package/ktor-ktor-utils.js +741 -741
- package/ktor-ktor-websockets.js +60 -60
- package/package.json +1 -1
- package/raspberry-cardgame-lib-core.js +339 -316
- package/raspberry-cardgame-lib-core.js.map +1 -1
- package/raspberry-cardgame-lib-logger.js +102 -102
- package/raspberry-cardgame-lib-random.js +1042 -1017
- package/raspberry-cardgame-lib-random.js.map +1 -1
- package/secure-random-secure-random.js +18 -18
- package/uuid.js +33 -33
|
@@ -19,72 +19,73 @@
|
|
|
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 THROW_CCE = kotlin_kotlin.$_$.
|
|
26
|
-
var Comparator = kotlin_kotlin.$_$.
|
|
22
|
+
var protoOf = kotlin_kotlin.$_$.wc;
|
|
23
|
+
var initMetadataForObject = kotlin_kotlin.$_$.ac;
|
|
24
|
+
var defineProp = kotlin_kotlin.$_$.mb;
|
|
25
|
+
var THROW_CCE = kotlin_kotlin.$_$.ug;
|
|
26
|
+
var Comparator = kotlin_kotlin.$_$.gg;
|
|
27
27
|
var VOID = kotlin_kotlin.$_$.f;
|
|
28
|
+
var initMetadataForClass = kotlin_kotlin.$_$.vb;
|
|
28
29
|
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.n;
|
|
29
|
-
var Unit_instance = kotlin_kotlin.$_$.
|
|
30
|
-
var take = kotlin_kotlin.$_$.
|
|
31
|
-
var toList = kotlin_kotlin.$_$.
|
|
32
|
-
var takeLast = kotlin_kotlin.$_$.
|
|
33
|
-
var noWhenBranchMatchedException = kotlin_kotlin.$_$.
|
|
34
|
-
var initMetadataForCompanion = kotlin_kotlin.$_$.
|
|
30
|
+
var Unit_instance = kotlin_kotlin.$_$.q5;
|
|
31
|
+
var take = kotlin_kotlin.$_$.q9;
|
|
32
|
+
var toList = kotlin_kotlin.$_$.u9;
|
|
33
|
+
var takeLast = kotlin_kotlin.$_$.p9;
|
|
34
|
+
var noWhenBranchMatchedException = kotlin_kotlin.$_$.sh;
|
|
35
|
+
var initMetadataForCompanion = kotlin_kotlin.$_$.wb;
|
|
35
36
|
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.w1;
|
|
36
|
-
var Enum = kotlin_kotlin.$_$.
|
|
37
|
-
var initMetadataForClass = kotlin_kotlin.$_$.ub;
|
|
37
|
+
var Enum = kotlin_kotlin.$_$.jg;
|
|
38
38
|
var createSimpleEnumSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.e2;
|
|
39
|
-
var enumEntries = kotlin_kotlin.$_$.
|
|
39
|
+
var enumEntries = kotlin_kotlin.$_$.za;
|
|
40
40
|
var LazyThreadSafetyMode_PUBLICATION_getInstance = kotlin_kotlin.$_$.k;
|
|
41
|
-
var lazy = kotlin_kotlin.$_$.
|
|
41
|
+
var lazy = kotlin_kotlin.$_$.qh;
|
|
42
42
|
var SerializerFactory = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.c2;
|
|
43
|
-
var initMetadataForInterface = kotlin_kotlin.$_$.
|
|
44
|
-
var collectionSizeOrDefault = kotlin_kotlin.$_$.
|
|
43
|
+
var initMetadataForInterface = kotlin_kotlin.$_$.yb;
|
|
44
|
+
var collectionSizeOrDefault = kotlin_kotlin.$_$.t6;
|
|
45
45
|
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.m;
|
|
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.$_$.xa;
|
|
48
|
+
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.ia;
|
|
49
|
+
var initMetadataForCoroutine = kotlin_kotlin.$_$.xb;
|
|
50
|
+
var Result = kotlin_kotlin.$_$.sg;
|
|
51
|
+
var Result__exceptionOrNull_impl_p6xea9 = kotlin_kotlin.$_$.h3;
|
|
52
|
+
var throwOnFailure = kotlin_kotlin.$_$.wh;
|
|
53
|
+
var _Result___get_value__impl__bjfvqg = kotlin_kotlin.$_$.k3;
|
|
54
|
+
var _Result___get_isSuccess__impl__sndoy8 = kotlin_kotlin.$_$.j3;
|
|
55
|
+
var addAll = kotlin_kotlin.$_$.h6;
|
|
56
|
+
var until = kotlin_kotlin.$_$.md;
|
|
57
|
+
var count = kotlin_kotlin.$_$.k7;
|
|
58
|
+
var Collection = kotlin_kotlin.$_$.s5;
|
|
59
|
+
var isInterface = kotlin_kotlin.$_$.jc;
|
|
60
|
+
var toMutableList = kotlin_kotlin.$_$.y9;
|
|
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.$_$.
|
|
63
|
+
var listOf = kotlin_kotlin.$_$.r8;
|
|
64
|
+
var first = kotlin_kotlin.$_$.w7;
|
|
65
|
+
var sorted = kotlin_kotlin.$_$.n9;
|
|
66
|
+
var asReversed = kotlin_kotlin.$_$.l6;
|
|
67
67
|
var NoSuchElementException_init_$Create$ = kotlin_kotlin.$_$.d2;
|
|
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.$_$.
|
|
68
|
+
var equals = kotlin_kotlin.$_$.nb;
|
|
69
|
+
var FunctionAdapter = kotlin_kotlin.$_$.bb;
|
|
70
|
+
var hashCode = kotlin_kotlin.$_$.ub;
|
|
71
|
+
var first_0 = kotlin_kotlin.$_$.v7;
|
|
72
|
+
var compareValues = kotlin_kotlin.$_$.ga;
|
|
73
|
+
var sortWith = kotlin_kotlin.$_$.l9;
|
|
74
|
+
var lastOrNull = kotlin_kotlin.$_$.l8;
|
|
75
75
|
var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.w;
|
|
76
|
-
var sortedWith = kotlin_kotlin.$_$.
|
|
76
|
+
var sortedWith = kotlin_kotlin.$_$.m9;
|
|
77
77
|
var NoSuchElementException_init_$Create$_0 = kotlin_kotlin.$_$.b2;
|
|
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.$_$.
|
|
78
|
+
var compareTo = kotlin_kotlin.$_$.lb;
|
|
79
|
+
var toString = kotlin_kotlin.$_$.ad;
|
|
80
|
+
var dropLast = kotlin_kotlin.$_$.m7;
|
|
81
|
+
var plus = kotlin_kotlin.$_$.a9;
|
|
82
|
+
var minus = kotlin_kotlin.$_$.v8;
|
|
83
|
+
var plus_0 = kotlin_kotlin.$_$.b9;
|
|
84
84
|
//endregion
|
|
85
85
|
//region block: pre-declaration
|
|
86
86
|
initMetadataForObject(CoreConfig, 'CoreConfig');
|
|
87
87
|
initMetadataForObject(CardIndexComparator, 'CardIndexComparator', VOID, VOID, [Comparator]);
|
|
88
|
+
initMetadataForClass(CardSuitSortingComparator, 'CardSuitSortingComparator', VOID, VOID, [Comparator]);
|
|
88
89
|
initMetadataForObject(CardNumberComparator, 'CardNumberComparator', VOID, VOID, [Comparator]);
|
|
89
90
|
initMetadataForCompanion(Companion);
|
|
90
91
|
initMetadataForClass(CardName, 'CardName', VOID, Enum);
|
|
@@ -95,11 +96,11 @@
|
|
|
95
96
|
initMetadataForClass(CardsRandomProvider, 'CardsRandomProvider', VOID, Enum);
|
|
96
97
|
function standardShuffledCards$default(cards, times, $super) {
|
|
97
98
|
times = times === VOID ? 3 : times;
|
|
98
|
-
return $super === VOID ? this.
|
|
99
|
+
return $super === VOID ? this.q65(cards, times) : $super.q65.call(this, cards, times);
|
|
99
100
|
}
|
|
100
101
|
function realLifeShuffledCards$default(cards, times, $super) {
|
|
101
102
|
times = times === VOID ? 20 : times;
|
|
102
|
-
return $super === VOID ? this.
|
|
103
|
+
return $super === VOID ? this.s65(cards, times) : $super.s65.call(this, cards, times);
|
|
103
104
|
}
|
|
104
105
|
initMetadataForInterface(CardsDealerProvider, 'CardsDealerProvider', VOID, VOID, VOID, [5]);
|
|
105
106
|
initMetadataForCompanion(Companion_2);
|
|
@@ -112,12 +113,12 @@
|
|
|
112
113
|
checkFromIndex = checkFromIndex === VOID ? first(supportedCombinations) : checkFromIndex;
|
|
113
114
|
includeCardNames = includeCardNames === VOID ? null : includeCardNames;
|
|
114
115
|
suit = suit === VOID ? null : suit;
|
|
115
|
-
return $super === VOID ? this.
|
|
116
|
+
return $super === VOID ? this.q67(cards, supportedCombinations, checkFromIndex, includeCardNames, suit) : $super.q67.call(this, cards, supportedCombinations, checkFromIndex, includeCardNames, suit);
|
|
116
117
|
}
|
|
117
118
|
function findSameCardsNumberCombinations$default(cards, cardsCount, includeCardNames, $super) {
|
|
118
119
|
cardsCount = cardsCount === VOID ? 4 : cardsCount;
|
|
119
120
|
includeCardNames = includeCardNames === VOID ? null : includeCardNames;
|
|
120
|
-
return $super === VOID ? this.
|
|
121
|
+
return $super === VOID ? this.s67(cards, cardsCount, includeCardNames) : $super.s67.call(this, cards, cardsCount, includeCardNames);
|
|
121
122
|
}
|
|
122
123
|
initMetadataForInterface(CombinationsCheckerProvider, 'CombinationsCheckerProvider');
|
|
123
124
|
initMetadataForClass(sam$kotlin_Comparator$0, 'sam$kotlin_Comparator$0', VOID, VOID, [Comparator, FunctionAdapter]);
|
|
@@ -126,9 +127,9 @@
|
|
|
126
127
|
initMetadataForClass(DealerReducerImpl, 'DealerReducerImpl', VOID, VOID, [DealerReducer]);
|
|
127
128
|
//endregion
|
|
128
129
|
function CoreConfig() {
|
|
129
|
-
this.version = '0.0.
|
|
130
|
+
this.version = '0.0.50';
|
|
130
131
|
}
|
|
131
|
-
protoOf(CoreConfig).
|
|
132
|
+
protoOf(CoreConfig).o2y = function () {
|
|
132
133
|
return this.version;
|
|
133
134
|
};
|
|
134
135
|
var CoreConfig_instance;
|
|
@@ -137,17 +138,34 @@
|
|
|
137
138
|
}
|
|
138
139
|
function CardIndexComparator() {
|
|
139
140
|
}
|
|
140
|
-
protoOf(CardIndexComparator).
|
|
141
|
-
return a.
|
|
141
|
+
protoOf(CardIndexComparator).t64 = function (a, b) {
|
|
142
|
+
return a.u64_1 - b.u64_1 | 0;
|
|
142
143
|
};
|
|
143
144
|
protoOf(CardIndexComparator).compare = function (a, b) {
|
|
144
145
|
var tmp = a instanceof GameCard ? a : THROW_CCE();
|
|
145
|
-
return this.
|
|
146
|
+
return this.t64(tmp, b instanceof GameCard ? b : THROW_CCE());
|
|
146
147
|
};
|
|
147
148
|
var CardIndexComparator_instance;
|
|
148
149
|
function CardIndexComparator_getInstance() {
|
|
149
150
|
return CardIndexComparator_instance;
|
|
150
151
|
}
|
|
152
|
+
function CardSuitSortingComparator(suit) {
|
|
153
|
+
this.v64_1 = suit;
|
|
154
|
+
}
|
|
155
|
+
protoOf(CardSuitSortingComparator).t64 = function (a, b) {
|
|
156
|
+
if (!a.w64() || !b.w64()) {
|
|
157
|
+
return 0;
|
|
158
|
+
}
|
|
159
|
+
var suitIndexL = this.v64_1.x1(a.x64());
|
|
160
|
+
var suitIndexR = this.v64_1.x1(b.x64());
|
|
161
|
+
var sortedNumberL = imul(suitIndexL, 13) + a.y64() | 0;
|
|
162
|
+
var sortedNumberR = imul(suitIndexR, 13) + b.y64() | 0;
|
|
163
|
+
return sortedNumberL - sortedNumberR | 0;
|
|
164
|
+
};
|
|
165
|
+
protoOf(CardSuitSortingComparator).compare = function (a, b) {
|
|
166
|
+
var tmp = a instanceof GameCard ? a : THROW_CCE();
|
|
167
|
+
return this.t64(tmp, b instanceof GameCard ? b : THROW_CCE());
|
|
168
|
+
};
|
|
151
169
|
function filterByCardName(_this__u8e3s4, name) {
|
|
152
170
|
// Inline function 'kotlin.collections.filter' call
|
|
153
171
|
var predicate = byCardNamePredicate(name.slice());
|
|
@@ -164,12 +182,12 @@
|
|
|
164
182
|
}
|
|
165
183
|
function CardNumberComparator() {
|
|
166
184
|
}
|
|
167
|
-
protoOf(CardNumberComparator).
|
|
168
|
-
return b.
|
|
185
|
+
protoOf(CardNumberComparator).t64 = function (a, b) {
|
|
186
|
+
return b.y64() - a.y64() | 0;
|
|
169
187
|
};
|
|
170
188
|
protoOf(CardNumberComparator).compare = function (a, b) {
|
|
171
189
|
var tmp = a instanceof GameCard ? a : THROW_CCE();
|
|
172
|
-
return this.
|
|
190
|
+
return this.t64(tmp, b instanceof GameCard ? b : THROW_CCE());
|
|
173
191
|
};
|
|
174
192
|
var CardNumberComparator_instance;
|
|
175
193
|
function CardNumberComparator_getInstance() {
|
|
@@ -177,12 +195,12 @@
|
|
|
177
195
|
}
|
|
178
196
|
function distributeCardsBottom(_this__u8e3s4, count) {
|
|
179
197
|
var cardsToDeal = toList(take(_this__u8e3s4, count));
|
|
180
|
-
_this__u8e3s4.
|
|
198
|
+
_this__u8e3s4.c2(cardsToDeal);
|
|
181
199
|
return cardsToDeal;
|
|
182
200
|
}
|
|
183
201
|
function distributeCardsTop(_this__u8e3s4, count) {
|
|
184
202
|
var cardsToDeal = toList(takeLast(_this__u8e3s4, count));
|
|
185
|
-
_this__u8e3s4.
|
|
203
|
+
_this__u8e3s4.c2(cardsToDeal);
|
|
186
204
|
return cardsToDeal;
|
|
187
205
|
}
|
|
188
206
|
function byCardNamePredicate(types) {
|
|
@@ -200,7 +218,7 @@
|
|
|
200
218
|
var element = indexedObject[inductionVariable];
|
|
201
219
|
inductionVariable = inductionVariable + 1 | 0;
|
|
202
220
|
// Inline function 'io.raspberryapps.card_game.core.data.models.cards.byCardNamePredicate.<anonymous>.<anonymous>' call
|
|
203
|
-
if (p1.
|
|
221
|
+
if (p1.s2().equals(element)) {
|
|
204
222
|
tmp$ret$1 = true;
|
|
205
223
|
break $l$block;
|
|
206
224
|
}
|
|
@@ -212,7 +230,7 @@
|
|
|
212
230
|
}
|
|
213
231
|
var CardName_ACE_instance;
|
|
214
232
|
var CardName_KING_instance;
|
|
215
|
-
var
|
|
233
|
+
var CardName_QUEEN_instance;
|
|
216
234
|
var CardName_JACK_instance;
|
|
217
235
|
var CardName_TEN_instance;
|
|
218
236
|
var CardName_NINE_instance;
|
|
@@ -223,10 +241,10 @@
|
|
|
223
241
|
var CardName_FOUR_instance;
|
|
224
242
|
var CardName_TREE_instance;
|
|
225
243
|
var CardName_TWO_instance;
|
|
226
|
-
var
|
|
244
|
+
var CardName_HIDDEN_instance;
|
|
227
245
|
function getShortName($this) {
|
|
228
246
|
var tmp;
|
|
229
|
-
switch ($this.
|
|
247
|
+
switch ($this.r2_1) {
|
|
230
248
|
case 0:
|
|
231
249
|
tmp = 'A';
|
|
232
250
|
break;
|
|
@@ -234,7 +252,7 @@
|
|
|
234
252
|
tmp = 'K';
|
|
235
253
|
break;
|
|
236
254
|
case 2:
|
|
237
|
-
tmp = '
|
|
255
|
+
tmp = 'Q';
|
|
238
256
|
break;
|
|
239
257
|
case 3:
|
|
240
258
|
tmp = 'J';
|
|
@@ -267,7 +285,7 @@
|
|
|
267
285
|
tmp = '2';
|
|
268
286
|
break;
|
|
269
287
|
case 13:
|
|
270
|
-
tmp = '
|
|
288
|
+
tmp = 'HIDDEN';
|
|
271
289
|
break;
|
|
272
290
|
default:
|
|
273
291
|
noWhenBranchMatchedException();
|
|
@@ -282,7 +300,7 @@
|
|
|
282
300
|
CardName_entriesInitialized = true;
|
|
283
301
|
CardName_ACE_instance = new CardName('ACE', 0);
|
|
284
302
|
CardName_KING_instance = new CardName('KING', 1);
|
|
285
|
-
|
|
303
|
+
CardName_QUEEN_instance = new CardName('QUEEN', 2);
|
|
286
304
|
CardName_JACK_instance = new CardName('JACK', 3);
|
|
287
305
|
CardName_TEN_instance = new CardName('TEN', 4);
|
|
288
306
|
CardName_NINE_instance = new CardName('NINE', 5);
|
|
@@ -293,45 +311,45 @@
|
|
|
293
311
|
CardName_FOUR_instance = new CardName('FOUR', 10);
|
|
294
312
|
CardName_TREE_instance = new CardName('TREE', 11);
|
|
295
313
|
CardName_TWO_instance = new CardName('TWO', 12);
|
|
296
|
-
|
|
314
|
+
CardName_HIDDEN_instance = new CardName('HIDDEN', 13);
|
|
297
315
|
}
|
|
298
316
|
function Companion() {
|
|
299
317
|
}
|
|
300
|
-
protoOf(Companion).
|
|
318
|
+
protoOf(Companion).z64 = function (suit, number) {
|
|
301
319
|
return new GameCard(getNumber(Companion_instance_0, getName(Companion_instance_0, number), suit));
|
|
302
320
|
};
|
|
303
|
-
protoOf(Companion).
|
|
321
|
+
protoOf(Companion).a65 = function (suit, cardNumber) {
|
|
304
322
|
return new GameCard(getNumber(Companion_instance_0, cardNumber, suit));
|
|
305
323
|
};
|
|
306
|
-
protoOf(Companion).
|
|
324
|
+
protoOf(Companion).b65 = function (index) {
|
|
307
325
|
return new GameCard(index);
|
|
308
326
|
};
|
|
309
|
-
protoOf(Companion).
|
|
327
|
+
protoOf(Companion).c65 = function (position, playerIndex, previousHiddenCardWithMaxIndex, reverse) {
|
|
310
328
|
var tmp;
|
|
311
|
-
if (
|
|
329
|
+
if (previousHiddenCardWithMaxIndex == null) {
|
|
312
330
|
tmp = null;
|
|
313
331
|
} else {
|
|
314
332
|
// Inline function 'kotlin.takeIf' call
|
|
315
333
|
// Inline function 'kotlin.contracts.contract' call
|
|
316
334
|
var tmp_0;
|
|
317
|
-
// Inline function 'io.raspberryapps.card_game.core.data.models.cards.Companion.
|
|
318
|
-
if (
|
|
319
|
-
tmp_0 =
|
|
335
|
+
// Inline function 'io.raspberryapps.card_game.core.data.models.cards.Companion.createUniqueHiddenCard.<anonymous>' call
|
|
336
|
+
if (previousHiddenCardWithMaxIndex.d65()) {
|
|
337
|
+
tmp_0 = previousHiddenCardWithMaxIndex;
|
|
320
338
|
} else {
|
|
321
339
|
tmp_0 = null;
|
|
322
340
|
}
|
|
323
341
|
tmp = tmp_0;
|
|
324
342
|
}
|
|
325
343
|
var tmp3_safe_receiver = tmp;
|
|
326
|
-
var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.
|
|
327
|
-
var tmp5_safe_receiver = tmp4_safe_receiver == null ? null : Companion_instance_0.
|
|
344
|
+
var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.u64_1;
|
|
345
|
+
var tmp5_safe_receiver = tmp4_safe_receiver == null ? null : Companion_instance_0.j65(tmp4_safe_receiver, playerIndex, reverse);
|
|
328
346
|
var tmp_1;
|
|
329
347
|
if (tmp5_safe_receiver == null) {
|
|
330
348
|
tmp_1 = null;
|
|
331
349
|
} else {
|
|
332
350
|
// Inline function 'kotlin.let' call
|
|
333
351
|
// Inline function 'kotlin.contracts.contract' call
|
|
334
|
-
// Inline function 'io.raspberryapps.card_game.core.data.models.cards.Companion.
|
|
352
|
+
// Inline function 'io.raspberryapps.card_game.core.data.models.cards.Companion.createUniqueHiddenCard.<anonymous>' call
|
|
335
353
|
tmp_1 = tmp5_safe_receiver + 1 | 0;
|
|
336
354
|
}
|
|
337
355
|
var tmp0_elvis_lhs = tmp_1;
|
|
@@ -345,10 +363,14 @@
|
|
|
345
363
|
var index = tmp_2;
|
|
346
364
|
return new GameCard(index);
|
|
347
365
|
};
|
|
348
|
-
protoOf(Companion).
|
|
349
|
-
|
|
366
|
+
protoOf(Companion).k65 = function (position, playerIndex, previousHiddenCardWithMaxIndex, reverse, $super) {
|
|
367
|
+
previousHiddenCardWithMaxIndex = previousHiddenCardWithMaxIndex === VOID ? null : previousHiddenCardWithMaxIndex;
|
|
350
368
|
reverse = reverse === VOID ? false : reverse;
|
|
351
|
-
return $super === VOID ? this.
|
|
369
|
+
return $super === VOID ? this.c65(position, playerIndex, previousHiddenCardWithMaxIndex, reverse) : $super.c65.call(this, position, playerIndex, previousHiddenCardWithMaxIndex, reverse);
|
|
370
|
+
};
|
|
371
|
+
protoOf(Companion).l65 = function (position) {
|
|
372
|
+
var index = 150 + position | 0;
|
|
373
|
+
return new GameCard(index);
|
|
352
374
|
};
|
|
353
375
|
var Companion_instance;
|
|
354
376
|
function Companion_getInstance() {
|
|
@@ -359,7 +381,7 @@
|
|
|
359
381
|
}
|
|
360
382
|
function getCardNumber($this, number) {
|
|
361
383
|
var tmp;
|
|
362
|
-
switch (number.
|
|
384
|
+
switch (number.r2_1) {
|
|
363
385
|
case 12:
|
|
364
386
|
tmp = 0;
|
|
365
387
|
break;
|
|
@@ -438,7 +460,7 @@
|
|
|
438
460
|
tmp = CardName_JACK_getInstance();
|
|
439
461
|
break;
|
|
440
462
|
case 10:
|
|
441
|
-
tmp =
|
|
463
|
+
tmp = CardName_QUEEN_getInstance();
|
|
442
464
|
break;
|
|
443
465
|
case 11:
|
|
444
466
|
tmp = CardName_KING_getInstance();
|
|
@@ -452,7 +474,7 @@
|
|
|
452
474
|
return tmp;
|
|
453
475
|
}
|
|
454
476
|
function _get_isShirt__vd98rp($this) {
|
|
455
|
-
return $this.
|
|
477
|
+
return $this.u64_1 >= 150 && $this.u64_1 <= 202;
|
|
456
478
|
}
|
|
457
479
|
function CardName(name, ordinal) {
|
|
458
480
|
Enum.call(this, name, ordinal);
|
|
@@ -461,13 +483,13 @@
|
|
|
461
483
|
return getShortName(this);
|
|
462
484
|
};
|
|
463
485
|
function Companion_0() {
|
|
464
|
-
this.
|
|
465
|
-
this.
|
|
466
|
-
this.
|
|
467
|
-
this.
|
|
468
|
-
this.
|
|
486
|
+
this.e65_1 = -1;
|
|
487
|
+
this.f65_1 = 13;
|
|
488
|
+
this.g65_1 = 52;
|
|
489
|
+
this.h65_1 = 150;
|
|
490
|
+
this.i65_1 = 53;
|
|
469
491
|
}
|
|
470
|
-
protoOf(Companion_0).
|
|
492
|
+
protoOf(Companion_0).j65 = function (_this__u8e3s4, playerIndex, reverse) {
|
|
471
493
|
var tmp;
|
|
472
494
|
if (reverse) {
|
|
473
495
|
tmp = _this__u8e3s4 + (53 + imul(playerIndex, 14) | 0) | 0;
|
|
@@ -488,9 +510,9 @@
|
|
|
488
510
|
CardName_initEntries();
|
|
489
511
|
return CardName_KING_instance;
|
|
490
512
|
}
|
|
491
|
-
function
|
|
513
|
+
function CardName_QUEEN_getInstance() {
|
|
492
514
|
CardName_initEntries();
|
|
493
|
-
return
|
|
515
|
+
return CardName_QUEEN_instance;
|
|
494
516
|
}
|
|
495
517
|
function CardName_JACK_getInstance() {
|
|
496
518
|
CardName_initEntries();
|
|
@@ -532,64 +554,64 @@
|
|
|
532
554
|
CardName_initEntries();
|
|
533
555
|
return CardName_TWO_instance;
|
|
534
556
|
}
|
|
535
|
-
function
|
|
557
|
+
function CardName_HIDDEN_getInstance() {
|
|
536
558
|
CardName_initEntries();
|
|
537
|
-
return
|
|
559
|
+
return CardName_HIDDEN_instance;
|
|
538
560
|
}
|
|
539
561
|
function GameCard(index) {
|
|
540
|
-
this.
|
|
562
|
+
this.u64_1 = index;
|
|
541
563
|
}
|
|
542
564
|
protoOf(GameCard).x64 = function () {
|
|
543
565
|
var tmp;
|
|
544
|
-
var containsArg = this.
|
|
566
|
+
var containsArg = this.u64_1;
|
|
545
567
|
if (0 <= containsArg ? containsArg <= 13 : false) {
|
|
546
568
|
tmp = Suit_DIAMOND_getInstance();
|
|
547
569
|
} else {
|
|
548
|
-
if (this.
|
|
570
|
+
if (this.u64_1 <= 26) {
|
|
549
571
|
tmp = Suit_SPADE_getInstance();
|
|
550
572
|
} else {
|
|
551
|
-
if (this.
|
|
573
|
+
if (this.u64_1 <= 39) {
|
|
552
574
|
tmp = Suit_HEART_getInstance();
|
|
553
575
|
} else {
|
|
554
|
-
if (this.
|
|
576
|
+
if (this.u64_1 <= 52) {
|
|
555
577
|
tmp = Suit_CLUB_getInstance();
|
|
556
578
|
} else {
|
|
557
|
-
throw IllegalStateException_init_$Create$('Invalid suitCard in Card.getValue() ' + this.
|
|
579
|
+
throw IllegalStateException_init_$Create$('Invalid suitCard in Card.getValue() ' + this.u64_1);
|
|
558
580
|
}
|
|
559
581
|
}
|
|
560
582
|
}
|
|
561
583
|
}
|
|
562
584
|
return tmp;
|
|
563
585
|
};
|
|
564
|
-
protoOf(GameCard).
|
|
586
|
+
protoOf(GameCard).y64 = function () {
|
|
565
587
|
var tmp;
|
|
566
|
-
if (this.
|
|
588
|
+
if (this.d65()) {
|
|
567
589
|
tmp = -1;
|
|
568
590
|
} else {
|
|
569
|
-
tmp = this.
|
|
591
|
+
tmp = this.u64_1 - imul(13, getIndex(this.x64())) | 0;
|
|
570
592
|
}
|
|
571
593
|
return tmp;
|
|
572
594
|
};
|
|
573
|
-
protoOf(GameCard).
|
|
574
|
-
return this.
|
|
595
|
+
protoOf(GameCard).s2 = function () {
|
|
596
|
+
return this.d65() ? CardName_HIDDEN_getInstance() : getName(Companion_instance_0, this.y64());
|
|
575
597
|
};
|
|
576
|
-
protoOf(GameCard).
|
|
577
|
-
return !_get_isShirt__vd98rp(this) && !this.
|
|
598
|
+
protoOf(GameCard).w64 = function () {
|
|
599
|
+
return !_get_isShirt__vd98rp(this) && !this.d65();
|
|
578
600
|
};
|
|
579
|
-
protoOf(GameCard).
|
|
580
|
-
return this.
|
|
601
|
+
protoOf(GameCard).d65 = function () {
|
|
602
|
+
return this.u64_1 >= 53 && this.u64_1 <= 105;
|
|
581
603
|
};
|
|
582
604
|
protoOf(GameCard).toString = function () {
|
|
583
605
|
if (_get_isShirt__vd98rp(this)) {
|
|
584
|
-
return 'GameCard(SHIRT)';
|
|
606
|
+
return 'GameCard(SHIRT, ' + this.u64_1 + ')';
|
|
585
607
|
}
|
|
586
|
-
if (this.
|
|
587
|
-
return 'GameCard(
|
|
608
|
+
if (this.d65()) {
|
|
609
|
+
return 'GameCard(HIDDEN, ' + this.u64_1 + ')';
|
|
588
610
|
}
|
|
589
|
-
return 'GameCard(' + this.x64().toString() + this.
|
|
611
|
+
return 'GameCard(' + this.x64().toString() + this.s2().toString() + ', ' + this.u64_1 + ')';
|
|
590
612
|
};
|
|
591
613
|
protoOf(GameCard).hashCode = function () {
|
|
592
|
-
return this.
|
|
614
|
+
return this.u64_1;
|
|
593
615
|
};
|
|
594
616
|
protoOf(GameCard).equals = function (other) {
|
|
595
617
|
if (this === other)
|
|
@@ -597,12 +619,12 @@
|
|
|
597
619
|
if (!(other instanceof GameCard))
|
|
598
620
|
return false;
|
|
599
621
|
var tmp0_other_with_cast = other instanceof GameCard ? other : THROW_CCE();
|
|
600
|
-
if (!(this.
|
|
622
|
+
if (!(this.u64_1 === tmp0_other_with_cast.u64_1))
|
|
601
623
|
return false;
|
|
602
624
|
return true;
|
|
603
625
|
};
|
|
604
626
|
function _get_$cachedSerializer__te6jhj($this) {
|
|
605
|
-
return $this.
|
|
627
|
+
return $this.m65_1.u();
|
|
606
628
|
}
|
|
607
629
|
function Suit$Companion$_anonymous__cbm2iq() {
|
|
608
630
|
return createSimpleEnumSerializer('io.raspberryapps.card_game.core.data.models.cards.Suit', values());
|
|
@@ -613,7 +635,7 @@
|
|
|
613
635
|
var Suit_CLUB_instance;
|
|
614
636
|
function getSuitEmoji($this) {
|
|
615
637
|
var tmp;
|
|
616
|
-
switch ($this.
|
|
638
|
+
switch ($this.r2_1) {
|
|
617
639
|
case 0:
|
|
618
640
|
tmp = '\u2666\uFE0F';
|
|
619
641
|
break;
|
|
@@ -644,13 +666,13 @@
|
|
|
644
666
|
Companion_instance_1 = this;
|
|
645
667
|
var tmp = this;
|
|
646
668
|
var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
647
|
-
tmp.
|
|
669
|
+
tmp.m65_1 = lazy(tmp_0, Suit$Companion$_anonymous__cbm2iq);
|
|
648
670
|
}
|
|
649
|
-
protoOf(Companion_1).
|
|
671
|
+
protoOf(Companion_1).x4v = function () {
|
|
650
672
|
return _get_$cachedSerializer__te6jhj(this);
|
|
651
673
|
};
|
|
652
|
-
protoOf(Companion_1).
|
|
653
|
-
return this.
|
|
674
|
+
protoOf(Companion_1).u4f = function (typeParamsSerializers) {
|
|
675
|
+
return this.x4v();
|
|
654
676
|
};
|
|
655
677
|
var Companion_instance_1;
|
|
656
678
|
function Companion_getInstance_1() {
|
|
@@ -695,7 +717,7 @@
|
|
|
695
717
|
}
|
|
696
718
|
function getIndex(_this__u8e3s4) {
|
|
697
719
|
var tmp;
|
|
698
|
-
switch (_this__u8e3s4.
|
|
720
|
+
switch (_this__u8e3s4.r2_1) {
|
|
699
721
|
case 0:
|
|
700
722
|
tmp = 0;
|
|
701
723
|
break;
|
|
@@ -745,9 +767,9 @@
|
|
|
745
767
|
}
|
|
746
768
|
function getRandomOrgCards($this, leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundsCount, userData, signed, $completion) {
|
|
747
769
|
var tmp = new $getRandomOrgCardsCOROUTINE$1($this, leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundsCount, userData, signed, $completion);
|
|
748
|
-
tmp.
|
|
749
|
-
tmp.
|
|
750
|
-
return tmp.
|
|
770
|
+
tmp.l9_1 = Unit_instance;
|
|
771
|
+
tmp.m9_1 = null;
|
|
772
|
+
return tmp.r9();
|
|
751
773
|
}
|
|
752
774
|
function normalizeCards($this, cards, leftCardIndexForEachSuit) {
|
|
753
775
|
var oneSuitCount = cards.m() / get_entries().m() | 0;
|
|
@@ -768,7 +790,7 @@
|
|
|
768
790
|
}
|
|
769
791
|
function Companion_2() {
|
|
770
792
|
}
|
|
771
|
-
protoOf(Companion_2).
|
|
793
|
+
protoOf(Companion_2).p66 = function (randomPoolProvider, logger) {
|
|
772
794
|
var tmp17_random = new SecureRandom(logger);
|
|
773
795
|
return new CardsDealerProviderImpl(tmp17_random, randomPoolProvider, logger);
|
|
774
796
|
};
|
|
@@ -778,41 +800,41 @@
|
|
|
778
800
|
}
|
|
779
801
|
function $createNewShuffledCardDeckCOROUTINE$0(_this__u8e3s4, leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundCountForGame, userData, provider, resultContinuation) {
|
|
780
802
|
CoroutineImpl.call(this, resultContinuation);
|
|
781
|
-
this.
|
|
782
|
-
this.
|
|
783
|
-
this.
|
|
784
|
-
this.
|
|
785
|
-
this.
|
|
786
|
-
this.
|
|
787
|
-
}
|
|
788
|
-
protoOf($createNewShuffledCardDeckCOROUTINE$0).
|
|
789
|
-
var suspendResult = this.
|
|
803
|
+
this.y66_1 = _this__u8e3s4;
|
|
804
|
+
this.z66_1 = leftCardIndexForEachSuit;
|
|
805
|
+
this.a67_1 = rightCardIndexForEachSuit;
|
|
806
|
+
this.b67_1 = approximateRoundCountForGame;
|
|
807
|
+
this.c67_1 = userData;
|
|
808
|
+
this.d67_1 = provider;
|
|
809
|
+
}
|
|
810
|
+
protoOf($createNewShuffledCardDeckCOROUTINE$0).r9 = function () {
|
|
811
|
+
var suspendResult = this.l9_1;
|
|
790
812
|
$sm: do
|
|
791
813
|
try {
|
|
792
|
-
var tmp = this.
|
|
814
|
+
var tmp = this.j9_1;
|
|
793
815
|
switch (tmp) {
|
|
794
816
|
case 0:
|
|
795
|
-
this.
|
|
796
|
-
this.
|
|
797
|
-
this.
|
|
798
|
-
if (this.
|
|
817
|
+
this.k9_1 = 4;
|
|
818
|
+
this.e67_1 = this.d67_1;
|
|
819
|
+
this.f67_1 = this.e67_1.r2_1;
|
|
820
|
+
if (this.f67_1 === 0) {
|
|
799
821
|
var tmp_0 = this;
|
|
800
|
-
var it = this.
|
|
801
|
-
tmp_0.
|
|
802
|
-
this.
|
|
822
|
+
var it = this.y66_1.n65(this.z66_1, this.a67_1);
|
|
823
|
+
tmp_0.g67_1 = this.y66_1.r65(it);
|
|
824
|
+
this.j9_1 = 3;
|
|
803
825
|
continue $sm;
|
|
804
826
|
} else {
|
|
805
|
-
if (this.
|
|
806
|
-
this.
|
|
807
|
-
suspendResult = getRandomOrgCards(this.
|
|
827
|
+
if (this.f67_1 === 1) {
|
|
828
|
+
this.j9_1 = 2;
|
|
829
|
+
suspendResult = getRandomOrgCards(this.y66_1, this.z66_1, this.a67_1, this.b67_1, this.c67_1, false, this);
|
|
808
830
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
809
831
|
return suspendResult;
|
|
810
832
|
}
|
|
811
833
|
continue $sm;
|
|
812
834
|
} else {
|
|
813
|
-
if (this.
|
|
814
|
-
this.
|
|
815
|
-
suspendResult = getRandomOrgCards(this.
|
|
835
|
+
if (this.f67_1 === 2) {
|
|
836
|
+
this.j9_1 = 1;
|
|
837
|
+
suspendResult = getRandomOrgCards(this.y66_1, this.z66_1, this.a67_1, this.b67_1, this.c67_1, true, this);
|
|
816
838
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
817
839
|
return suspendResult;
|
|
818
840
|
}
|
|
@@ -826,86 +848,86 @@
|
|
|
826
848
|
|
|
827
849
|
break;
|
|
828
850
|
case 1:
|
|
829
|
-
this.
|
|
830
|
-
this.
|
|
851
|
+
this.g67_1 = suspendResult;
|
|
852
|
+
this.j9_1 = 3;
|
|
831
853
|
continue $sm;
|
|
832
854
|
case 2:
|
|
833
|
-
this.
|
|
834
|
-
this.
|
|
855
|
+
this.g67_1 = suspendResult;
|
|
856
|
+
this.j9_1 = 3;
|
|
835
857
|
continue $sm;
|
|
836
858
|
case 3:
|
|
837
|
-
return this.
|
|
859
|
+
return this.g67_1;
|
|
838
860
|
case 4:
|
|
839
|
-
throw this.
|
|
861
|
+
throw this.m9_1;
|
|
840
862
|
}
|
|
841
863
|
} catch ($p) {
|
|
842
864
|
var e = $p;
|
|
843
|
-
if (this.
|
|
865
|
+
if (this.k9_1 === 4) {
|
|
844
866
|
throw e;
|
|
845
867
|
} else {
|
|
846
|
-
this.
|
|
847
|
-
this.
|
|
868
|
+
this.j9_1 = this.k9_1;
|
|
869
|
+
this.m9_1 = e;
|
|
848
870
|
}
|
|
849
871
|
}
|
|
850
872
|
while (true);
|
|
851
873
|
};
|
|
852
874
|
function $getRandomOrgCardsCOROUTINE$1(_this__u8e3s4, leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundsCount, userData, signed, resultContinuation) {
|
|
853
875
|
CoroutineImpl.call(this, resultContinuation);
|
|
854
|
-
this.
|
|
855
|
-
this.
|
|
856
|
-
this.
|
|
857
|
-
this.
|
|
858
|
-
this.
|
|
859
|
-
this.
|
|
860
|
-
}
|
|
861
|
-
protoOf($getRandomOrgCardsCOROUTINE$1).
|
|
862
|
-
var suspendResult = this.
|
|
876
|
+
this.c66_1 = _this__u8e3s4;
|
|
877
|
+
this.d66_1 = leftCardIndexForEachSuit;
|
|
878
|
+
this.e66_1 = rightCardIndexForEachSuit;
|
|
879
|
+
this.f66_1 = approximateRoundsCount;
|
|
880
|
+
this.g66_1 = userData;
|
|
881
|
+
this.h66_1 = signed;
|
|
882
|
+
}
|
|
883
|
+
protoOf($getRandomOrgCardsCOROUTINE$1).r9 = function () {
|
|
884
|
+
var suspendResult = this.l9_1;
|
|
863
885
|
$sm: do
|
|
864
886
|
try {
|
|
865
|
-
var tmp = this.
|
|
887
|
+
var tmp = this.j9_1;
|
|
866
888
|
switch (tmp) {
|
|
867
889
|
case 0:
|
|
868
|
-
this.
|
|
869
|
-
this.
|
|
870
|
-
this.
|
|
871
|
-
this.
|
|
872
|
-
this.
|
|
873
|
-
suspendResult = this.
|
|
890
|
+
this.k9_1 = 5;
|
|
891
|
+
this.i66_1 = this.c66_1.k67(this.d66_1, this.e66_1);
|
|
892
|
+
this.j66_1 = this.c66_1.i67_1;
|
|
893
|
+
this.k66_1 = this.i66_1 - 1 | 0;
|
|
894
|
+
this.j9_1 = 1;
|
|
895
|
+
suspendResult = this.j66_1.d5q(this.f66_1, this.g66_1, 0, this.k66_1, this.i66_1, this.h66_1, VOID, this);
|
|
874
896
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
875
897
|
return suspendResult;
|
|
876
898
|
}
|
|
877
899
|
|
|
878
|
-
this.
|
|
900
|
+
this.j9_1 = 2;
|
|
879
901
|
continue $sm;
|
|
880
902
|
case 1:
|
|
881
|
-
this.
|
|
882
|
-
suspendResult = new Result(this.
|
|
883
|
-
this.
|
|
903
|
+
this.l66_1 = suspendResult.sk_1;
|
|
904
|
+
suspendResult = new Result(this.l66_1);
|
|
905
|
+
this.j9_1 = 2;
|
|
884
906
|
continue $sm;
|
|
885
907
|
case 2:
|
|
886
|
-
this.
|
|
887
|
-
if (_Result___get_isSuccess__impl__sndoy8(this.
|
|
908
|
+
this.m66_1 = suspendResult.sk_1;
|
|
909
|
+
if (_Result___get_isSuccess__impl__sndoy8(this.m66_1)) {
|
|
888
910
|
var tmp_0 = this;
|
|
889
|
-
var this_0 = this.
|
|
911
|
+
var this_0 = this.m66_1;
|
|
890
912
|
throwOnFailure(this_0);
|
|
891
913
|
var tmp_1 = _Result___get_value__impl__bjfvqg(this_0);
|
|
892
914
|
var tmp14_cards = ((tmp_1 == null ? true : !(tmp_1 == null)) ? tmp_1 : THROW_CCE()).cards;
|
|
893
|
-
var this_1 = normalizeCards(this.
|
|
915
|
+
var this_1 = normalizeCards(this.c66_1, tmp14_cards, this.d66_1);
|
|
894
916
|
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_1, 10));
|
|
895
917
|
var tmp0_iterator = this_1.j();
|
|
896
918
|
while (tmp0_iterator.k()) {
|
|
897
919
|
var item = tmp0_iterator.l();
|
|
898
|
-
destination.e(Companion_instance.
|
|
920
|
+
destination.e(Companion_instance.b65(item));
|
|
899
921
|
}
|
|
900
|
-
tmp_0.
|
|
901
|
-
this.
|
|
922
|
+
tmp_0.n66_1 = destination;
|
|
923
|
+
this.j9_1 = 4;
|
|
902
924
|
continue $sm;
|
|
903
925
|
} else {
|
|
904
|
-
this.
|
|
905
|
-
var tmp15_safe_receiver = this.
|
|
906
|
-
this.
|
|
907
|
-
this.
|
|
908
|
-
suspendResult = this.
|
|
926
|
+
this.o66_1 = Result__exceptionOrNull_impl_p6xea9(this.m66_1);
|
|
927
|
+
var tmp15_safe_receiver = this.o66_1;
|
|
928
|
+
this.c66_1.j67_1.v('CardsDealerProvider', 'getRandomOrgCards: ' + (tmp15_safe_receiver == null ? null : tmp15_safe_receiver.message), this.o66_1);
|
|
929
|
+
this.j9_1 = 3;
|
|
930
|
+
suspendResult = this.c66_1.o65(this.d66_1, this.e66_1, this.f66_1, this.g66_1, CardsRandomProvider_CUSTOM_getInstance(), this);
|
|
909
931
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
910
932
|
return suspendResult;
|
|
911
933
|
}
|
|
@@ -913,31 +935,31 @@
|
|
|
913
935
|
}
|
|
914
936
|
|
|
915
937
|
case 3:
|
|
916
|
-
this.
|
|
917
|
-
this.
|
|
938
|
+
this.n66_1 = suspendResult;
|
|
939
|
+
this.j9_1 = 4;
|
|
918
940
|
continue $sm;
|
|
919
941
|
case 4:
|
|
920
|
-
return this.
|
|
942
|
+
return this.n66_1;
|
|
921
943
|
case 5:
|
|
922
|
-
throw this.
|
|
944
|
+
throw this.m9_1;
|
|
923
945
|
}
|
|
924
946
|
} catch ($p) {
|
|
925
947
|
var e = $p;
|
|
926
|
-
if (this.
|
|
948
|
+
if (this.k9_1 === 5) {
|
|
927
949
|
throw e;
|
|
928
950
|
} else {
|
|
929
|
-
this.
|
|
930
|
-
this.
|
|
951
|
+
this.j9_1 = this.k9_1;
|
|
952
|
+
this.m9_1 = e;
|
|
931
953
|
}
|
|
932
954
|
}
|
|
933
955
|
while (true);
|
|
934
956
|
};
|
|
935
957
|
function CardsDealerProviderImpl(random, randomPoolProvider, logger) {
|
|
936
|
-
this.
|
|
937
|
-
this.
|
|
938
|
-
this.
|
|
958
|
+
this.h67_1 = random;
|
|
959
|
+
this.i67_1 = randomPoolProvider;
|
|
960
|
+
this.j67_1 = logger;
|
|
939
961
|
}
|
|
940
|
-
protoOf(CardsDealerProviderImpl).
|
|
962
|
+
protoOf(CardsDealerProviderImpl).n65 = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit) {
|
|
941
963
|
// Inline function 'kotlin.collections.flatMap' call
|
|
942
964
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
943
965
|
var this_0 = get_entries();
|
|
@@ -947,7 +969,7 @@
|
|
|
947
969
|
var element = tmp0_iterator.l();
|
|
948
970
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.cards.CardsDealerProviderImpl.createNewCardDeck.<anonymous>' call
|
|
949
971
|
// Inline function 'kotlin.collections.map' call
|
|
950
|
-
var this_1 = this.
|
|
972
|
+
var this_1 = this.l67(leftCardIndexForEachSuit, rightCardIndexForEachSuit);
|
|
951
973
|
// Inline function 'kotlin.collections.mapTo' call
|
|
952
974
|
var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_1, 10));
|
|
953
975
|
var inductionVariable = this_1.a1_1;
|
|
@@ -958,7 +980,7 @@
|
|
|
958
980
|
inductionVariable = inductionVariable + 1 | 0;
|
|
959
981
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.cards.CardsDealerProviderImpl.createNewCardDeck.<anonymous>.<anonymous>' call
|
|
960
982
|
var it = item;
|
|
961
|
-
var tmp$ret$0 = Companion_instance.
|
|
983
|
+
var tmp$ret$0 = Companion_instance.z64(element, it);
|
|
962
984
|
destination_0.e(tmp$ret$0);
|
|
963
985
|
}
|
|
964
986
|
while (!(item === last));
|
|
@@ -967,10 +989,10 @@
|
|
|
967
989
|
}
|
|
968
990
|
return destination;
|
|
969
991
|
};
|
|
970
|
-
protoOf(CardsDealerProviderImpl).
|
|
992
|
+
protoOf(CardsDealerProviderImpl).l67 = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit) {
|
|
971
993
|
return until(leftCardIndexForEachSuit, 13 - rightCardIndexForEachSuit | 0);
|
|
972
994
|
};
|
|
973
|
-
protoOf(CardsDealerProviderImpl).
|
|
995
|
+
protoOf(CardsDealerProviderImpl).k67 = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit) {
|
|
974
996
|
// Inline function 'kotlin.collections.sumOf' call
|
|
975
997
|
var sum = 0;
|
|
976
998
|
var tmp0_iterator = get_entries().j();
|
|
@@ -978,17 +1000,17 @@
|
|
|
978
1000
|
var element = tmp0_iterator.l();
|
|
979
1001
|
var tmp = sum;
|
|
980
1002
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.cards.CardsDealerProviderImpl.getCardsCount.<anonymous>' call
|
|
981
|
-
sum = tmp + count(this.
|
|
1003
|
+
sum = tmp + count(this.l67(leftCardIndexForEachSuit, rightCardIndexForEachSuit)) | 0;
|
|
982
1004
|
}
|
|
983
1005
|
return sum;
|
|
984
1006
|
};
|
|
985
|
-
protoOf(CardsDealerProviderImpl).
|
|
1007
|
+
protoOf(CardsDealerProviderImpl).o65 = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundCountForGame, userData, provider, $completion) {
|
|
986
1008
|
var tmp = new $createNewShuffledCardDeckCOROUTINE$0(this, leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundCountForGame, userData, provider, $completion);
|
|
987
|
-
tmp.
|
|
988
|
-
tmp.
|
|
989
|
-
return tmp.
|
|
1009
|
+
tmp.l9_1 = Unit_instance;
|
|
1010
|
+
tmp.m9_1 = null;
|
|
1011
|
+
return tmp.r9();
|
|
990
1012
|
};
|
|
991
|
-
protoOf(CardsDealerProviderImpl).
|
|
1013
|
+
protoOf(CardsDealerProviderImpl).p65 = function (count, cards) {
|
|
992
1014
|
// Inline function 'kotlin.apply' call
|
|
993
1015
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
994
1016
|
var this_0 = ArrayList_init_$Create$();
|
|
@@ -1001,7 +1023,7 @@
|
|
|
1001
1023
|
if (this_0.m() === count) {
|
|
1002
1024
|
break $l$block;
|
|
1003
1025
|
}
|
|
1004
|
-
var hasSimilarCard = this_0.
|
|
1026
|
+
var hasSimilarCard = this_0.v1(card);
|
|
1005
1027
|
if (hasSimilarCard) {
|
|
1006
1028
|
continue $l$loop_0;
|
|
1007
1029
|
}
|
|
@@ -1022,7 +1044,7 @@
|
|
|
1022
1044
|
while (tmp0_iterator.k()) {
|
|
1023
1045
|
var element = tmp0_iterator.l();
|
|
1024
1046
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.cards.CardsDealerProviderImpl.getNRandomUniqueCards.<anonymous>.<anonymous>' call
|
|
1025
|
-
if (element.
|
|
1047
|
+
if (element.y64() === card.y64()) {
|
|
1026
1048
|
tmp$ret$2 = true;
|
|
1027
1049
|
break $l$block_1;
|
|
1028
1050
|
}
|
|
@@ -1037,7 +1059,7 @@
|
|
|
1037
1059
|
}
|
|
1038
1060
|
return this_0;
|
|
1039
1061
|
};
|
|
1040
|
-
protoOf(CardsDealerProviderImpl).
|
|
1062
|
+
protoOf(CardsDealerProviderImpl).q65 = function (cards, times) {
|
|
1041
1063
|
// Inline function 'kotlin.let' call
|
|
1042
1064
|
// Inline function 'kotlin.contracts.contract' call
|
|
1043
1065
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.cards.CardsDealerProviderImpl.standardShuffledCards.<anonymous>' call
|
|
@@ -1047,62 +1069,62 @@
|
|
|
1047
1069
|
do {
|
|
1048
1070
|
var i = inductionVariable;
|
|
1049
1071
|
inductionVariable = inductionVariable + 1 | 0;
|
|
1050
|
-
shuffled = this.
|
|
1072
|
+
shuffled = this.h67_1.o5u(shuffled);
|
|
1051
1073
|
}
|
|
1052
1074
|
while (inductionVariable < times);
|
|
1053
1075
|
return shuffled;
|
|
1054
1076
|
};
|
|
1055
|
-
protoOf(CardsDealerProviderImpl).
|
|
1056
|
-
return toList(overhand(riffle(toMutableList(cards), times, this.
|
|
1077
|
+
protoOf(CardsDealerProviderImpl).s65 = function (cards, times) {
|
|
1078
|
+
return toList(overhand(riffle(toMutableList(cards), times, this.h67_1), times, this.h67_1));
|
|
1057
1079
|
};
|
|
1058
1080
|
function Companion_3() {
|
|
1059
1081
|
}
|
|
1060
|
-
protoOf(Companion_3).
|
|
1082
|
+
protoOf(Companion_3).m67 = function () {
|
|
1061
1083
|
// Inline function 'kotlin.apply' call
|
|
1062
1084
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
1063
1085
|
var this_0 = ArrayList_init_$Create$();
|
|
1064
1086
|
// Inline function 'kotlin.contracts.contract' call
|
|
1065
1087
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.cards.Companion.getCards.<anonymous>' call
|
|
1066
|
-
this_0.n(listOf([Companion_instance.
|
|
1067
|
-
this_0.n(listOf([Companion_instance.
|
|
1068
|
-
this_0.n(listOf([Companion_instance.
|
|
1069
|
-
this_0.n(listOf([Companion_instance.
|
|
1070
|
-
this_0.n(listOf([Companion_instance.
|
|
1088
|
+
this_0.n(listOf([Companion_instance.a65(Suit_DIAMOND_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.a65(Suit_CLUB_getInstance(), CardName_NINE_getInstance()), Companion_instance.a65(Suit_CLUB_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.a65(Suit_CLUB_getInstance(), CardName_TEN_getInstance()), Companion_instance.a65(Suit_HEART_getInstance(), CardName_JACK_getInstance()), Companion_instance.a65(Suit_HEART_getInstance(), CardName_KING_getInstance())]));
|
|
1089
|
+
this_0.n(listOf([Companion_instance.a65(Suit_CLUB_getInstance(), CardName_JACK_getInstance()), Companion_instance.a65(Suit_SPADE_getInstance(), CardName_ACE_getInstance()), Companion_instance.a65(Suit_DIAMOND_getInstance(), CardName_NINE_getInstance()), Companion_instance.a65(Suit_DIAMOND_getInstance(), CardName_TEN_getInstance()), Companion_instance.a65(Suit_DIAMOND_getInstance(), CardName_JACK_getInstance()), Companion_instance.a65(Suit_HEART_getInstance(), CardName_EIGHT_getInstance())]));
|
|
1090
|
+
this_0.n(listOf([Companion_instance.a65(Suit_CLUB_getInstance(), CardName_QUEEN_getInstance()), Companion_instance.a65(Suit_HEART_getInstance(), CardName_ACE_getInstance()), Companion_instance.a65(Suit_HEART_getInstance(), CardName_QUEEN_getInstance()), Companion_instance.a65(Suit_HEART_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.a65(Suit_SPADE_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.a65(Suit_CLUB_getInstance(), CardName_KING_getInstance())]));
|
|
1091
|
+
this_0.n(listOf([Companion_instance.a65(Suit_SPADE_getInstance(), CardName_EIGHT_getInstance()), Companion_instance.a65(Suit_SPADE_getInstance(), CardName_TEN_getInstance()), Companion_instance.a65(Suit_HEART_getInstance(), CardName_TEN_getInstance()), Companion_instance.a65(Suit_SPADE_getInstance(), CardName_JACK_getInstance()), Companion_instance.a65(Suit_DIAMOND_getInstance(), CardName_EIGHT_getInstance()), Companion_instance.a65(Suit_SPADE_getInstance(), CardName_QUEEN_getInstance())]));
|
|
1092
|
+
this_0.n(listOf([Companion_instance.a65(Suit_DIAMOND_getInstance(), CardName_ACE_getInstance()), Companion_instance.a65(Suit_CLUB_getInstance(), CardName_EIGHT_getInstance()), Companion_instance.a65(Suit_DIAMOND_getInstance(), CardName_KING_getInstance()), Companion_instance.a65(Suit_SPADE_getInstance(), CardName_NINE_getInstance()), Companion_instance.a65(Suit_CLUB_getInstance(), CardName_ACE_getInstance()), Companion_instance.a65(Suit_SPADE_getInstance(), CardName_KING_getInstance()), Companion_instance.a65(Suit_DIAMOND_getInstance(), CardName_QUEEN_getInstance()), Companion_instance.a65(Suit_HEART_getInstance(), CardName_NINE_getInstance())]));
|
|
1071
1093
|
return this_0;
|
|
1072
1094
|
};
|
|
1073
|
-
protoOf(Companion_3).
|
|
1074
|
-
return listOf([Companion_instance.
|
|
1095
|
+
protoOf(Companion_3).n67 = function () {
|
|
1096
|
+
return listOf([Companion_instance.a65(Suit_CLUB_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.a65(Suit_HEART_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.a65(Suit_SPADE_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.a65(Suit_SPADE_getInstance(), CardName_EIGHT_getInstance())]);
|
|
1075
1097
|
};
|
|
1076
1098
|
var Companion_instance_3;
|
|
1077
1099
|
function Companion_getInstance_3() {
|
|
1078
1100
|
return Companion_instance_3;
|
|
1079
1101
|
}
|
|
1080
1102
|
function FakeCardsDealerProvider(cards, cardsForLot) {
|
|
1081
|
-
cards = cards === VOID ? Companion_instance_3.
|
|
1082
|
-
cardsForLot = cardsForLot === VOID ? Companion_instance_3.
|
|
1083
|
-
this.
|
|
1084
|
-
this.
|
|
1103
|
+
cards = cards === VOID ? Companion_instance_3.m67() : cards;
|
|
1104
|
+
cardsForLot = cardsForLot === VOID ? Companion_instance_3.n67() : cardsForLot;
|
|
1105
|
+
this.o67_1 = cards;
|
|
1106
|
+
this.p67_1 = cardsForLot;
|
|
1085
1107
|
}
|
|
1086
|
-
protoOf(FakeCardsDealerProvider).
|
|
1087
|
-
return this.
|
|
1108
|
+
protoOf(FakeCardsDealerProvider).n65 = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit) {
|
|
1109
|
+
return this.o67_1;
|
|
1088
1110
|
};
|
|
1089
|
-
protoOf(FakeCardsDealerProvider).
|
|
1090
|
-
return this.
|
|
1111
|
+
protoOf(FakeCardsDealerProvider).o65 = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundCountForGame, userData, provider, $completion) {
|
|
1112
|
+
return this.o67_1;
|
|
1091
1113
|
};
|
|
1092
|
-
protoOf(FakeCardsDealerProvider).
|
|
1093
|
-
return this.
|
|
1114
|
+
protoOf(FakeCardsDealerProvider).p65 = function (count, cards) {
|
|
1115
|
+
return this.p67_1;
|
|
1094
1116
|
};
|
|
1095
|
-
protoOf(FakeCardsDealerProvider).
|
|
1117
|
+
protoOf(FakeCardsDealerProvider).q65 = function (cards, times) {
|
|
1096
1118
|
return cards;
|
|
1097
1119
|
};
|
|
1098
|
-
protoOf(FakeCardsDealerProvider).
|
|
1120
|
+
protoOf(FakeCardsDealerProvider).s65 = function (cards, times) {
|
|
1099
1121
|
return cards;
|
|
1100
1122
|
};
|
|
1101
1123
|
function CombinationsCheckerProvider() {
|
|
1102
1124
|
}
|
|
1103
1125
|
function createCombination($this, cards, supportedCombinations) {
|
|
1104
1126
|
var size = cards.m();
|
|
1105
|
-
if (supportedCombinations.
|
|
1127
|
+
if (supportedCombinations.v1(size)) {
|
|
1106
1128
|
return cards;
|
|
1107
1129
|
}
|
|
1108
1130
|
var fromLongestCombinations = asReversed(sorted(supportedCombinations));
|
|
@@ -1124,23 +1146,23 @@
|
|
|
1124
1146
|
return takeLast(cards, longestCombinationSupport);
|
|
1125
1147
|
}
|
|
1126
1148
|
function sam$kotlin_Comparator$0(function_0) {
|
|
1127
|
-
this.
|
|
1149
|
+
this.v67_1 = function_0;
|
|
1128
1150
|
}
|
|
1129
|
-
protoOf(sam$kotlin_Comparator$0).
|
|
1130
|
-
return this.
|
|
1151
|
+
protoOf(sam$kotlin_Comparator$0).rc = function (a, b) {
|
|
1152
|
+
return this.v67_1(a, b);
|
|
1131
1153
|
};
|
|
1132
1154
|
protoOf(sam$kotlin_Comparator$0).compare = function (a, b) {
|
|
1133
|
-
return this.
|
|
1155
|
+
return this.rc(a, b);
|
|
1134
1156
|
};
|
|
1135
|
-
protoOf(sam$kotlin_Comparator$0).
|
|
1136
|
-
return this.
|
|
1157
|
+
protoOf(sam$kotlin_Comparator$0).t3 = function () {
|
|
1158
|
+
return this.v67_1;
|
|
1137
1159
|
};
|
|
1138
1160
|
protoOf(sam$kotlin_Comparator$0).equals = function (other) {
|
|
1139
1161
|
var tmp;
|
|
1140
1162
|
if (!(other == null) ? isInterface(other, Comparator) : false) {
|
|
1141
1163
|
var tmp_0;
|
|
1142
1164
|
if (!(other == null) ? isInterface(other, FunctionAdapter) : false) {
|
|
1143
|
-
tmp_0 = equals(this.
|
|
1165
|
+
tmp_0 = equals(this.t3(), other.t3());
|
|
1144
1166
|
} else {
|
|
1145
1167
|
tmp_0 = false;
|
|
1146
1168
|
}
|
|
@@ -1151,19 +1173,19 @@
|
|
|
1151
1173
|
return tmp;
|
|
1152
1174
|
};
|
|
1153
1175
|
protoOf(sam$kotlin_Comparator$0).hashCode = function () {
|
|
1154
|
-
return hashCode(this.
|
|
1176
|
+
return hashCode(this.t3());
|
|
1155
1177
|
};
|
|
1156
1178
|
function CombinationsCheckerProviderImpl$createCombinationsFromCardsInRow$lambda(a, b) {
|
|
1157
1179
|
// Inline function 'kotlin.comparisons.compareValuesBy' call
|
|
1158
1180
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.combinations.CombinationsCheckerProviderImpl.createCombinationsFromCardsInRow.<anonymous>' call
|
|
1159
|
-
var tmp = first_0(a).
|
|
1181
|
+
var tmp = first_0(a).u64_1;
|
|
1160
1182
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.combinations.CombinationsCheckerProviderImpl.createCombinationsFromCardsInRow.<anonymous>' call
|
|
1161
|
-
var tmp$ret$1 = first_0(b).
|
|
1183
|
+
var tmp$ret$1 = first_0(b).u64_1;
|
|
1162
1184
|
return compareValues(tmp, tmp$ret$1);
|
|
1163
1185
|
}
|
|
1164
1186
|
function CombinationsCheckerProviderImpl() {
|
|
1165
1187
|
}
|
|
1166
|
-
protoOf(CombinationsCheckerProviderImpl).
|
|
1188
|
+
protoOf(CombinationsCheckerProviderImpl).q67 = function (cards, supportedCombinations, checkFromIndex, includeCardNames, suit) {
|
|
1167
1189
|
// Inline function 'kotlin.collections.filter' call
|
|
1168
1190
|
// Inline function 'kotlin.apply' call
|
|
1169
1191
|
var this_0 = toMutableList(cards);
|
|
@@ -1176,7 +1198,7 @@
|
|
|
1176
1198
|
while (tmp0_iterator.k()) {
|
|
1177
1199
|
var element = tmp0_iterator.l();
|
|
1178
1200
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.combinations.CombinationsCheckerProviderImpl.findCardsInRowCombinations.<anonymous>' call
|
|
1179
|
-
if (element.
|
|
1201
|
+
if (element.w64()) {
|
|
1180
1202
|
destination.e(element);
|
|
1181
1203
|
}
|
|
1182
1204
|
}
|
|
@@ -1193,16 +1215,16 @@
|
|
|
1193
1215
|
inductionVariable = inductionVariable + 1 | 0;
|
|
1194
1216
|
var previousCard = lastOrNull(combinationCards);
|
|
1195
1217
|
var currentCard = sortedByIndexCards.o(i);
|
|
1196
|
-
var isNextInRow = !(previousCard == null) && currentCard.
|
|
1197
|
-
var passedCardNamesCheck = includeCardNames == null || includeCardNames.
|
|
1218
|
+
var isNextInRow = !(previousCard == null) && currentCard.u64_1 === (previousCard.u64_1 + 1 | 0) && currentCard.x64().equals(previousCard.x64());
|
|
1219
|
+
var passedCardNamesCheck = includeCardNames == null || includeCardNames.v1(currentCard.s2());
|
|
1198
1220
|
var passedSuitCheck = suit == null || currentCard.x64().equals(suit);
|
|
1199
1221
|
if (isNextInRow && passedSuitCheck && passedCardNamesCheck) {
|
|
1200
1222
|
combinationCards.e(currentCard);
|
|
1201
1223
|
} else {
|
|
1202
1224
|
if (combinationCards.m() > (checkFromIndex - 1 | 0)) {
|
|
1203
|
-
combinations.n(this.
|
|
1225
|
+
combinations.n(this.u67(toMutableList(combinationCards), supportedCombinations));
|
|
1204
1226
|
}
|
|
1205
|
-
combinationCards.
|
|
1227
|
+
combinationCards.d2();
|
|
1206
1228
|
if (passedSuitCheck && passedCardNamesCheck) {
|
|
1207
1229
|
combinationCards.e(currentCard);
|
|
1208
1230
|
}
|
|
@@ -1210,11 +1232,11 @@
|
|
|
1210
1232
|
}
|
|
1211
1233
|
while (inductionVariable <= last);
|
|
1212
1234
|
if (combinationCards.m() > (checkFromIndex - 1 | 0)) {
|
|
1213
|
-
combinations.n(this.
|
|
1235
|
+
combinations.n(this.u67(toMutableList(combinationCards), supportedCombinations));
|
|
1214
1236
|
}
|
|
1215
1237
|
return combinations;
|
|
1216
1238
|
};
|
|
1217
|
-
protoOf(CombinationsCheckerProviderImpl).
|
|
1239
|
+
protoOf(CombinationsCheckerProviderImpl).s67 = function (cards, cardsCount, includeCardNames) {
|
|
1218
1240
|
// Inline function 'kotlin.collections.filter' call
|
|
1219
1241
|
// Inline function 'kotlin.collections.filter' call
|
|
1220
1242
|
// Inline function 'kotlin.apply' call
|
|
@@ -1228,7 +1250,7 @@
|
|
|
1228
1250
|
while (tmp0_iterator.k()) {
|
|
1229
1251
|
var element = tmp0_iterator.l();
|
|
1230
1252
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.combinations.CombinationsCheckerProviderImpl.findSameCardsNumberCombinations.<anonymous>' call
|
|
1231
|
-
if (element.
|
|
1253
|
+
if (element.w64()) {
|
|
1232
1254
|
destination.e(element);
|
|
1233
1255
|
}
|
|
1234
1256
|
}
|
|
@@ -1238,7 +1260,7 @@
|
|
|
1238
1260
|
while (tmp0_iterator_0.k()) {
|
|
1239
1261
|
var element_0 = tmp0_iterator_0.l();
|
|
1240
1262
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.combinations.CombinationsCheckerProviderImpl.findSameCardsNumberCombinations.<anonymous>' call
|
|
1241
|
-
if (includeCardNames == null || includeCardNames.
|
|
1263
|
+
if (includeCardNames == null || includeCardNames.v1(element_0.s2())) {
|
|
1242
1264
|
destination_0.e(element_0);
|
|
1243
1265
|
}
|
|
1244
1266
|
}
|
|
@@ -1251,14 +1273,14 @@
|
|
|
1251
1273
|
while (tmp0_iterator_1.k()) {
|
|
1252
1274
|
var element_1 = tmp0_iterator_1.l();
|
|
1253
1275
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.combinations.CombinationsCheckerProviderImpl.findSameCardsNumberCombinations.<anonymous>' call
|
|
1254
|
-
var key = element_1.
|
|
1276
|
+
var key = element_1.y64();
|
|
1255
1277
|
// Inline function 'kotlin.collections.getOrPut' call
|
|
1256
|
-
var value = destination_1.
|
|
1278
|
+
var value = destination_1.k2(key);
|
|
1257
1279
|
var tmp;
|
|
1258
1280
|
if (value == null) {
|
|
1259
1281
|
// Inline function 'kotlin.collections.groupByTo.<anonymous>' call
|
|
1260
1282
|
var answer = ArrayList_init_$Create$();
|
|
1261
|
-
destination_1.
|
|
1283
|
+
destination_1.n2(key, answer);
|
|
1262
1284
|
tmp = answer;
|
|
1263
1285
|
} else {
|
|
1264
1286
|
tmp = value;
|
|
@@ -1274,10 +1296,10 @@
|
|
|
1274
1296
|
var element_2 = tmp0_iterator_2.l();
|
|
1275
1297
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.combinations.CombinationsCheckerProviderImpl.findSameCardsNumberCombinations.<anonymous>' call
|
|
1276
1298
|
if (element_2.u().m() >= cardsCount) {
|
|
1277
|
-
destination_2.
|
|
1299
|
+
destination_2.n2(element_2.t(), element_2.u());
|
|
1278
1300
|
}
|
|
1279
1301
|
}
|
|
1280
|
-
var combinations = destination_2.
|
|
1302
|
+
var combinations = destination_2.m2();
|
|
1281
1303
|
// Inline function 'kotlin.collections.map' call
|
|
1282
1304
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1283
1305
|
var destination_3 = ArrayList_init_$Create$_0(collectionSizeOrDefault(combinations, 10));
|
|
@@ -1290,7 +1312,7 @@
|
|
|
1290
1312
|
}
|
|
1291
1313
|
return destination_3;
|
|
1292
1314
|
};
|
|
1293
|
-
protoOf(CombinationsCheckerProviderImpl).
|
|
1315
|
+
protoOf(CombinationsCheckerProviderImpl).u67 = function (cards, supportedCombinations) {
|
|
1294
1316
|
// Inline function 'kotlin.collections.minOf' call
|
|
1295
1317
|
var iterator = supportedCombinations.j();
|
|
1296
1318
|
if (!iterator.k())
|
|
@@ -1311,7 +1333,7 @@
|
|
|
1311
1333
|
while (cardsToCheck.m() >= shortestCombinationSupport) {
|
|
1312
1334
|
var combinationCards = createCombination(this, cardsToCheck, supportedCombinations);
|
|
1313
1335
|
combinations.e(toList(combinationCards));
|
|
1314
|
-
cardsToCheck.
|
|
1336
|
+
cardsToCheck.c2(combinationCards);
|
|
1315
1337
|
}
|
|
1316
1338
|
// Inline function 'kotlin.collections.sortedBy' call
|
|
1317
1339
|
// Inline function 'kotlin.comparisons.compareBy' call
|
|
@@ -1319,29 +1341,31 @@
|
|
|
1319
1341
|
var tmp$ret$4 = new sam$kotlin_Comparator$0(tmp);
|
|
1320
1342
|
return sortedWith(combinations, tmp$ret$4);
|
|
1321
1343
|
};
|
|
1344
|
+
function DealerReducer() {
|
|
1345
|
+
}
|
|
1322
1346
|
function DealerReducerImpl(logger, enableLogs) {
|
|
1323
|
-
this.
|
|
1324
|
-
this.
|
|
1347
|
+
this.z67_1 = logger;
|
|
1348
|
+
this.a68_1 = enableLogs;
|
|
1325
1349
|
}
|
|
1326
|
-
protoOf(DealerReducerImpl).
|
|
1350
|
+
protoOf(DealerReducerImpl).w67 = function (cards, cardsToRemove) {
|
|
1327
1351
|
var list = cards;
|
|
1328
1352
|
var _iterator__ex2g4s = cardsToRemove.j();
|
|
1329
1353
|
while (_iterator__ex2g4s.k()) {
|
|
1330
1354
|
var gameCard = _iterator__ex2g4s.l();
|
|
1331
|
-
list = this.
|
|
1355
|
+
list = this.x67(list, gameCard);
|
|
1332
1356
|
}
|
|
1333
1357
|
return list;
|
|
1334
1358
|
};
|
|
1335
|
-
protoOf(DealerReducerImpl).
|
|
1359
|
+
protoOf(DealerReducerImpl).x67 = function (cards, cardToRemove) {
|
|
1336
1360
|
var tmp;
|
|
1337
|
-
if (!cardToRemove.
|
|
1338
|
-
if (this.
|
|
1339
|
-
this.
|
|
1361
|
+
if (!cardToRemove.d65() && cards.v1(cardToRemove)) {
|
|
1362
|
+
if (this.a68_1) {
|
|
1363
|
+
this.z67_1.d('Dealer', 'Card removed: ' + cardToRemove.toString() + ', size: ' + (cards.m() - 1 | 0));
|
|
1340
1364
|
}
|
|
1341
1365
|
tmp = minus(cards, cardToRemove);
|
|
1342
1366
|
} else {
|
|
1343
|
-
if (this.
|
|
1344
|
-
this.
|
|
1367
|
+
if (this.a68_1) {
|
|
1368
|
+
this.z67_1.d('Dealer', 'Card removed as hidden: ' + cardToRemove.toString() + ', size: ' + (cards.m() - 1 | 0));
|
|
1345
1369
|
}
|
|
1346
1370
|
// Inline function 'kotlin.collections.filterNot' call
|
|
1347
1371
|
// Inline function 'kotlin.collections.filterNotTo' call
|
|
@@ -1350,11 +1374,11 @@
|
|
|
1350
1374
|
while (tmp0_iterator.k()) {
|
|
1351
1375
|
var element = tmp0_iterator.l();
|
|
1352
1376
|
// Inline function 'io.raspberryapps.card_game.core.domain.dealer.DealerReducerImpl.removeCard.<anonymous>' call
|
|
1353
|
-
if (!element.
|
|
1377
|
+
if (!element.d65()) {
|
|
1354
1378
|
destination.e(element);
|
|
1355
1379
|
}
|
|
1356
1380
|
}
|
|
1357
|
-
var
|
|
1381
|
+
var notHiddenCards = destination;
|
|
1358
1382
|
// Inline function 'kotlin.collections.filter' call
|
|
1359
1383
|
// Inline function 'kotlin.collections.filterTo' call
|
|
1360
1384
|
var destination_0 = ArrayList_init_$Create$();
|
|
@@ -1362,36 +1386,34 @@
|
|
|
1362
1386
|
while (tmp0_iterator_0.k()) {
|
|
1363
1387
|
var element_0 = tmp0_iterator_0.l();
|
|
1364
1388
|
// Inline function 'io.raspberryapps.card_game.core.domain.dealer.DealerReducerImpl.removeCard.<anonymous>' call
|
|
1365
|
-
if (element_0.
|
|
1389
|
+
if (element_0.d65()) {
|
|
1366
1390
|
destination_0.e(element_0);
|
|
1367
1391
|
}
|
|
1368
1392
|
}
|
|
1369
|
-
var
|
|
1370
|
-
if (
|
|
1371
|
-
this.
|
|
1393
|
+
var hiddenCards = destination_0;
|
|
1394
|
+
if (hiddenCards.p()) {
|
|
1395
|
+
this.z67_1.w('Dealer', "Can't find card to delete for player, " + ('cards:' + toString(cards) + ', ') + ('cardToRemove: ' + cardToRemove.toString()));
|
|
1372
1396
|
}
|
|
1373
|
-
tmp = plus(
|
|
1397
|
+
tmp = plus(notHiddenCards, dropLast(hiddenCards, 1));
|
|
1374
1398
|
}
|
|
1375
1399
|
return tmp;
|
|
1376
1400
|
};
|
|
1377
|
-
protoOf(DealerReducerImpl).
|
|
1378
|
-
if (this.
|
|
1379
|
-
this.
|
|
1401
|
+
protoOf(DealerReducerImpl).y67 = function (cards, cardToAdd) {
|
|
1402
|
+
if (this.a68_1) {
|
|
1403
|
+
this.z67_1.d('Dealer', 'Card added: ' + cardToAdd.toString() + ', size: ' + (cards.m() + 1 | 0));
|
|
1380
1404
|
}
|
|
1381
|
-
if (cards.
|
|
1382
|
-
this.
|
|
1405
|
+
if (cards.v1(cardToAdd)) {
|
|
1406
|
+
this.z67_1.w('Dealer', 'Card already exists for player, ' + ('cards:' + toString(cards) + ', ') + ('cardToAdd: ' + cardToAdd.toString()));
|
|
1383
1407
|
}
|
|
1384
1408
|
return plus_0(cards, cardToAdd);
|
|
1385
1409
|
};
|
|
1386
|
-
function DealerReducer() {
|
|
1387
|
-
}
|
|
1388
1410
|
//region block: post-declaration
|
|
1389
|
-
protoOf(CardsDealerProviderImpl).
|
|
1390
|
-
protoOf(CardsDealerProviderImpl).
|
|
1391
|
-
protoOf(FakeCardsDealerProvider).
|
|
1392
|
-
protoOf(FakeCardsDealerProvider).
|
|
1393
|
-
protoOf(CombinationsCheckerProviderImpl).
|
|
1394
|
-
protoOf(CombinationsCheckerProviderImpl).
|
|
1411
|
+
protoOf(CardsDealerProviderImpl).r65 = standardShuffledCards$default;
|
|
1412
|
+
protoOf(CardsDealerProviderImpl).t65 = realLifeShuffledCards$default;
|
|
1413
|
+
protoOf(FakeCardsDealerProvider).r65 = standardShuffledCards$default;
|
|
1414
|
+
protoOf(FakeCardsDealerProvider).t65 = realLifeShuffledCards$default;
|
|
1415
|
+
protoOf(CombinationsCheckerProviderImpl).r67 = findCardsInRowCombinations$default;
|
|
1416
|
+
protoOf(CombinationsCheckerProviderImpl).t67 = findSameCardsNumberCombinations$default;
|
|
1395
1417
|
//endregion
|
|
1396
1418
|
//region block: init
|
|
1397
1419
|
CoreConfig_instance = new CoreConfig();
|
|
@@ -1414,11 +1436,11 @@
|
|
|
1414
1436
|
_.$jsExportAll$ = $jsExportAll$;
|
|
1415
1437
|
_.$_$ = _.$_$ || {};
|
|
1416
1438
|
_.$_$.a = CardName_ACE_getInstance;
|
|
1417
|
-
_.$_$.b =
|
|
1418
|
-
_.$_$.c =
|
|
1419
|
-
_.$_$.d =
|
|
1420
|
-
_.$_$.e =
|
|
1421
|
-
_.$_$.f =
|
|
1439
|
+
_.$_$.b = CardName_EIGHT_getInstance;
|
|
1440
|
+
_.$_$.c = CardName_JACK_getInstance;
|
|
1441
|
+
_.$_$.d = CardName_KING_getInstance;
|
|
1442
|
+
_.$_$.e = CardName_NINE_getInstance;
|
|
1443
|
+
_.$_$.f = CardName_QUEEN_getInstance;
|
|
1422
1444
|
_.$_$.g = CardName_SEVEN_getInstance;
|
|
1423
1445
|
_.$_$.h = CardName_TEN_getInstance;
|
|
1424
1446
|
_.$_$.i = CardsRandomProvider_CUSTOM_getInstance;
|
|
@@ -1429,18 +1451,19 @@
|
|
|
1429
1451
|
_.$_$.n = Companion_instance;
|
|
1430
1452
|
_.$_$.o = Companion_getInstance_1;
|
|
1431
1453
|
_.$_$.p = Companion_instance_2;
|
|
1432
|
-
_.$_$.q =
|
|
1433
|
-
_.$_$.r =
|
|
1434
|
-
_.$_$.s =
|
|
1435
|
-
_.$_$.t =
|
|
1436
|
-
_.$_$.u =
|
|
1437
|
-
_.$_$.v =
|
|
1438
|
-
_.$_$.w =
|
|
1439
|
-
_.$_$.x =
|
|
1440
|
-
_.$_$.y =
|
|
1441
|
-
_.$_$.z =
|
|
1442
|
-
_.$_$.a1 =
|
|
1443
|
-
_.$_$.b1 =
|
|
1454
|
+
_.$_$.q = CardSuitSortingComparator;
|
|
1455
|
+
_.$_$.r = GameCard;
|
|
1456
|
+
_.$_$.s = get_entries;
|
|
1457
|
+
_.$_$.t = values;
|
|
1458
|
+
_.$_$.u = distributeCardsBottom;
|
|
1459
|
+
_.$_$.v = distributeCardsTop;
|
|
1460
|
+
_.$_$.w = filterByCardName;
|
|
1461
|
+
_.$_$.x = CardsDealerProvider;
|
|
1462
|
+
_.$_$.y = FakeCardsDealerProvider;
|
|
1463
|
+
_.$_$.z = CombinationsCheckerProviderImpl;
|
|
1464
|
+
_.$_$.a1 = CombinationsCheckerProvider;
|
|
1465
|
+
_.$_$.b1 = DealerReducerImpl;
|
|
1466
|
+
_.$_$.c1 = DealerReducer;
|
|
1444
1467
|
//endregion
|
|
1445
1468
|
return _;
|
|
1446
1469
|
}));
|