client_plugin_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 +1506 -1506
- package/Logic_Debertz-client_plugin.d.ts +56 -15
- package/Logic_Debertz-client_plugin.js +5358 -4983
- package/Logic_Debertz-client_plugin.js.map +1 -1
- package/Logic_Debertz-core.js +2942 -3175
- package/Logic_Debertz-core.js.map +1 -1
- package/Logic_Debertz-engine.js +17719 -17612
- package/Logic_Debertz-engine.js.map +1 -1
- package/Logic_Debertz-game_client.js +14411 -12548
- package/Logic_Debertz-game_client.js.map +1 -1
- package/Logic_Debertz-game_server.js +1621 -1519
- package/Logic_Debertz-game_server.js.map +1 -1
- package/kotlin-kotlin-stdlib.js +2883 -2641
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kotlinx-atomicfu.js +25 -25
- package/kotlinx-coroutines-core.js +3133 -3133
- 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 +1661 -1661
- 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 +320 -316
- package/raspberry-cardgame-lib-core.js.map +1 -1
- package/raspberry-cardgame-lib-logger.js +102 -102
- package/raspberry-cardgame-lib-random.js +1174 -1055
- package/raspberry-cardgame-lib-random.js.map +1 -1
- package/secure-random-secure-random.js +18 -18
- package/uuid.js +33 -33
|
@@ -19,68 +19,68 @@
|
|
|
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.$_$.
|
|
28
|
+
var initMetadataForClass = kotlin_kotlin.$_$.vb;
|
|
29
29
|
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.n;
|
|
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.$_$.
|
|
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;
|
|
36
36
|
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.w1;
|
|
37
|
-
var Enum = kotlin_kotlin.$_$.
|
|
37
|
+
var Enum = kotlin_kotlin.$_$.jg;
|
|
38
38
|
var createSimpleEnumSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.f2;
|
|
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.$_$.d2;
|
|
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');
|
|
@@ -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.j6b(cards, times) : $super.j6b.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.l6b(cards, times) : $super.l6b.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.j6d(cards, supportedCombinations, checkFromIndex, includeCardNames, suit) : $super.j6d.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.l6d(cards, cardsCount, includeCardNames) : $super.l6d.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]);
|
|
@@ -127,9 +127,9 @@
|
|
|
127
127
|
initMetadataForClass(DealerReducerImpl, 'DealerReducerImpl', VOID, VOID, [DealerReducer]);
|
|
128
128
|
//endregion
|
|
129
129
|
function CoreConfig() {
|
|
130
|
-
this.version = '0.0.
|
|
130
|
+
this.version = '0.0.50';
|
|
131
131
|
}
|
|
132
|
-
protoOf(CoreConfig).
|
|
132
|
+
protoOf(CoreConfig).l33 = function () {
|
|
133
133
|
return this.version;
|
|
134
134
|
};
|
|
135
135
|
var CoreConfig_instance;
|
|
@@ -138,33 +138,33 @@
|
|
|
138
138
|
}
|
|
139
139
|
function CardIndexComparator() {
|
|
140
140
|
}
|
|
141
|
-
protoOf(CardIndexComparator).
|
|
142
|
-
return a.
|
|
141
|
+
protoOf(CardIndexComparator).m6a = function (a, b) {
|
|
142
|
+
return a.n6a_1 - b.n6a_1 | 0;
|
|
143
143
|
};
|
|
144
144
|
protoOf(CardIndexComparator).compare = function (a, b) {
|
|
145
145
|
var tmp = a instanceof GameCard ? a : THROW_CCE();
|
|
146
|
-
return this.
|
|
146
|
+
return this.m6a(tmp, b instanceof GameCard ? b : THROW_CCE());
|
|
147
147
|
};
|
|
148
148
|
var CardIndexComparator_instance;
|
|
149
149
|
function CardIndexComparator_getInstance() {
|
|
150
150
|
return CardIndexComparator_instance;
|
|
151
151
|
}
|
|
152
152
|
function CardSuitSortingComparator(suit) {
|
|
153
|
-
this.
|
|
153
|
+
this.o6a_1 = suit;
|
|
154
154
|
}
|
|
155
|
-
protoOf(CardSuitSortingComparator).
|
|
156
|
-
if (!a.
|
|
155
|
+
protoOf(CardSuitSortingComparator).m6a = function (a, b) {
|
|
156
|
+
if (!a.p6a() || !b.p6a()) {
|
|
157
157
|
return 0;
|
|
158
158
|
}
|
|
159
|
-
var suitIndexL = this.
|
|
160
|
-
var suitIndexR = this.
|
|
161
|
-
var sortedNumberL = imul(suitIndexL, 13) + a.
|
|
162
|
-
var sortedNumberR = imul(suitIndexR, 13) + b.
|
|
159
|
+
var suitIndexL = this.o6a_1.x1(a.q6a());
|
|
160
|
+
var suitIndexR = this.o6a_1.x1(b.q6a());
|
|
161
|
+
var sortedNumberL = imul(suitIndexL, 13) + a.r6a() | 0;
|
|
162
|
+
var sortedNumberR = imul(suitIndexR, 13) + b.r6a() | 0;
|
|
163
163
|
return sortedNumberL - sortedNumberR | 0;
|
|
164
164
|
};
|
|
165
165
|
protoOf(CardSuitSortingComparator).compare = function (a, b) {
|
|
166
166
|
var tmp = a instanceof GameCard ? a : THROW_CCE();
|
|
167
|
-
return this.
|
|
167
|
+
return this.m6a(tmp, b instanceof GameCard ? b : THROW_CCE());
|
|
168
168
|
};
|
|
169
169
|
function filterByCardName(_this__u8e3s4, name) {
|
|
170
170
|
// Inline function 'kotlin.collections.filter' call
|
|
@@ -182,12 +182,12 @@
|
|
|
182
182
|
}
|
|
183
183
|
function CardNumberComparator() {
|
|
184
184
|
}
|
|
185
|
-
protoOf(CardNumberComparator).
|
|
186
|
-
return b.
|
|
185
|
+
protoOf(CardNumberComparator).m6a = function (a, b) {
|
|
186
|
+
return b.r6a() - a.r6a() | 0;
|
|
187
187
|
};
|
|
188
188
|
protoOf(CardNumberComparator).compare = function (a, b) {
|
|
189
189
|
var tmp = a instanceof GameCard ? a : THROW_CCE();
|
|
190
|
-
return this.
|
|
190
|
+
return this.m6a(tmp, b instanceof GameCard ? b : THROW_CCE());
|
|
191
191
|
};
|
|
192
192
|
var CardNumberComparator_instance;
|
|
193
193
|
function CardNumberComparator_getInstance() {
|
|
@@ -195,12 +195,12 @@
|
|
|
195
195
|
}
|
|
196
196
|
function distributeCardsBottom(_this__u8e3s4, count) {
|
|
197
197
|
var cardsToDeal = toList(take(_this__u8e3s4, count));
|
|
198
|
-
_this__u8e3s4.
|
|
198
|
+
_this__u8e3s4.c2(cardsToDeal);
|
|
199
199
|
return cardsToDeal;
|
|
200
200
|
}
|
|
201
201
|
function distributeCardsTop(_this__u8e3s4, count) {
|
|
202
202
|
var cardsToDeal = toList(takeLast(_this__u8e3s4, count));
|
|
203
|
-
_this__u8e3s4.
|
|
203
|
+
_this__u8e3s4.c2(cardsToDeal);
|
|
204
204
|
return cardsToDeal;
|
|
205
205
|
}
|
|
206
206
|
function byCardNamePredicate(types) {
|
|
@@ -218,7 +218,7 @@
|
|
|
218
218
|
var element = indexedObject[inductionVariable];
|
|
219
219
|
inductionVariable = inductionVariable + 1 | 0;
|
|
220
220
|
// Inline function 'io.raspberryapps.card_game.core.data.models.cards.byCardNamePredicate.<anonymous>.<anonymous>' call
|
|
221
|
-
if (p1.
|
|
221
|
+
if (p1.s2().equals(element)) {
|
|
222
222
|
tmp$ret$1 = true;
|
|
223
223
|
break $l$block;
|
|
224
224
|
}
|
|
@@ -230,7 +230,7 @@
|
|
|
230
230
|
}
|
|
231
231
|
var CardName_ACE_instance;
|
|
232
232
|
var CardName_KING_instance;
|
|
233
|
-
var
|
|
233
|
+
var CardName_QUEEN_instance;
|
|
234
234
|
var CardName_JACK_instance;
|
|
235
235
|
var CardName_TEN_instance;
|
|
236
236
|
var CardName_NINE_instance;
|
|
@@ -241,10 +241,10 @@
|
|
|
241
241
|
var CardName_FOUR_instance;
|
|
242
242
|
var CardName_TREE_instance;
|
|
243
243
|
var CardName_TWO_instance;
|
|
244
|
-
var
|
|
244
|
+
var CardName_HIDDEN_instance;
|
|
245
245
|
function getShortName($this) {
|
|
246
246
|
var tmp;
|
|
247
|
-
switch ($this.
|
|
247
|
+
switch ($this.r2_1) {
|
|
248
248
|
case 0:
|
|
249
249
|
tmp = 'A';
|
|
250
250
|
break;
|
|
@@ -252,7 +252,7 @@
|
|
|
252
252
|
tmp = 'K';
|
|
253
253
|
break;
|
|
254
254
|
case 2:
|
|
255
|
-
tmp = '
|
|
255
|
+
tmp = 'Q';
|
|
256
256
|
break;
|
|
257
257
|
case 3:
|
|
258
258
|
tmp = 'J';
|
|
@@ -285,7 +285,7 @@
|
|
|
285
285
|
tmp = '2';
|
|
286
286
|
break;
|
|
287
287
|
case 13:
|
|
288
|
-
tmp = '
|
|
288
|
+
tmp = 'HIDDEN';
|
|
289
289
|
break;
|
|
290
290
|
default:
|
|
291
291
|
noWhenBranchMatchedException();
|
|
@@ -300,7 +300,7 @@
|
|
|
300
300
|
CardName_entriesInitialized = true;
|
|
301
301
|
CardName_ACE_instance = new CardName('ACE', 0);
|
|
302
302
|
CardName_KING_instance = new CardName('KING', 1);
|
|
303
|
-
|
|
303
|
+
CardName_QUEEN_instance = new CardName('QUEEN', 2);
|
|
304
304
|
CardName_JACK_instance = new CardName('JACK', 3);
|
|
305
305
|
CardName_TEN_instance = new CardName('TEN', 4);
|
|
306
306
|
CardName_NINE_instance = new CardName('NINE', 5);
|
|
@@ -311,45 +311,45 @@
|
|
|
311
311
|
CardName_FOUR_instance = new CardName('FOUR', 10);
|
|
312
312
|
CardName_TREE_instance = new CardName('TREE', 11);
|
|
313
313
|
CardName_TWO_instance = new CardName('TWO', 12);
|
|
314
|
-
|
|
314
|
+
CardName_HIDDEN_instance = new CardName('HIDDEN', 13);
|
|
315
315
|
}
|
|
316
316
|
function Companion() {
|
|
317
317
|
}
|
|
318
|
-
protoOf(Companion).
|
|
318
|
+
protoOf(Companion).s6a = function (suit, number) {
|
|
319
319
|
return new GameCard(getNumber(Companion_instance_0, getName(Companion_instance_0, number), suit));
|
|
320
320
|
};
|
|
321
|
-
protoOf(Companion).
|
|
321
|
+
protoOf(Companion).t6a = function (suit, cardNumber) {
|
|
322
322
|
return new GameCard(getNumber(Companion_instance_0, cardNumber, suit));
|
|
323
323
|
};
|
|
324
|
-
protoOf(Companion).
|
|
324
|
+
protoOf(Companion).u6a = function (index) {
|
|
325
325
|
return new GameCard(index);
|
|
326
326
|
};
|
|
327
|
-
protoOf(Companion).
|
|
327
|
+
protoOf(Companion).v6a = function (position, playerIndex, previousHiddenCardWithMaxIndex, reverse) {
|
|
328
328
|
var tmp;
|
|
329
|
-
if (
|
|
329
|
+
if (previousHiddenCardWithMaxIndex == null) {
|
|
330
330
|
tmp = null;
|
|
331
331
|
} else {
|
|
332
332
|
// Inline function 'kotlin.takeIf' call
|
|
333
333
|
// Inline function 'kotlin.contracts.contract' call
|
|
334
334
|
var tmp_0;
|
|
335
|
-
// Inline function 'io.raspberryapps.card_game.core.data.models.cards.Companion.
|
|
336
|
-
if (
|
|
337
|
-
tmp_0 =
|
|
335
|
+
// Inline function 'io.raspberryapps.card_game.core.data.models.cards.Companion.createUniqueHiddenCard.<anonymous>' call
|
|
336
|
+
if (previousHiddenCardWithMaxIndex.w6a()) {
|
|
337
|
+
tmp_0 = previousHiddenCardWithMaxIndex;
|
|
338
338
|
} else {
|
|
339
339
|
tmp_0 = null;
|
|
340
340
|
}
|
|
341
341
|
tmp = tmp_0;
|
|
342
342
|
}
|
|
343
343
|
var tmp3_safe_receiver = tmp;
|
|
344
|
-
var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.
|
|
345
|
-
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.n6a_1;
|
|
345
|
+
var tmp5_safe_receiver = tmp4_safe_receiver == null ? null : Companion_instance_0.c6b(tmp4_safe_receiver, playerIndex, reverse);
|
|
346
346
|
var tmp_1;
|
|
347
347
|
if (tmp5_safe_receiver == null) {
|
|
348
348
|
tmp_1 = null;
|
|
349
349
|
} else {
|
|
350
350
|
// Inline function 'kotlin.let' call
|
|
351
351
|
// Inline function 'kotlin.contracts.contract' call
|
|
352
|
-
// 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
|
|
353
353
|
tmp_1 = tmp5_safe_receiver + 1 | 0;
|
|
354
354
|
}
|
|
355
355
|
var tmp0_elvis_lhs = tmp_1;
|
|
@@ -363,10 +363,14 @@
|
|
|
363
363
|
var index = tmp_2;
|
|
364
364
|
return new GameCard(index);
|
|
365
365
|
};
|
|
366
|
-
protoOf(Companion).
|
|
367
|
-
|
|
366
|
+
protoOf(Companion).d6b = function (position, playerIndex, previousHiddenCardWithMaxIndex, reverse, $super) {
|
|
367
|
+
previousHiddenCardWithMaxIndex = previousHiddenCardWithMaxIndex === VOID ? null : previousHiddenCardWithMaxIndex;
|
|
368
368
|
reverse = reverse === VOID ? false : reverse;
|
|
369
|
-
return $super === VOID ? this.
|
|
369
|
+
return $super === VOID ? this.v6a(position, playerIndex, previousHiddenCardWithMaxIndex, reverse) : $super.v6a.call(this, position, playerIndex, previousHiddenCardWithMaxIndex, reverse);
|
|
370
|
+
};
|
|
371
|
+
protoOf(Companion).e6b = function (position) {
|
|
372
|
+
var index = 150 + position | 0;
|
|
373
|
+
return new GameCard(index);
|
|
370
374
|
};
|
|
371
375
|
var Companion_instance;
|
|
372
376
|
function Companion_getInstance() {
|
|
@@ -377,7 +381,7 @@
|
|
|
377
381
|
}
|
|
378
382
|
function getCardNumber($this, number) {
|
|
379
383
|
var tmp;
|
|
380
|
-
switch (number.
|
|
384
|
+
switch (number.r2_1) {
|
|
381
385
|
case 12:
|
|
382
386
|
tmp = 0;
|
|
383
387
|
break;
|
|
@@ -456,7 +460,7 @@
|
|
|
456
460
|
tmp = CardName_JACK_getInstance();
|
|
457
461
|
break;
|
|
458
462
|
case 10:
|
|
459
|
-
tmp =
|
|
463
|
+
tmp = CardName_QUEEN_getInstance();
|
|
460
464
|
break;
|
|
461
465
|
case 11:
|
|
462
466
|
tmp = CardName_KING_getInstance();
|
|
@@ -470,7 +474,7 @@
|
|
|
470
474
|
return tmp;
|
|
471
475
|
}
|
|
472
476
|
function _get_isShirt__vd98rp($this) {
|
|
473
|
-
return $this.
|
|
477
|
+
return $this.n6a_1 >= 150 && $this.n6a_1 <= 202;
|
|
474
478
|
}
|
|
475
479
|
function CardName(name, ordinal) {
|
|
476
480
|
Enum.call(this, name, ordinal);
|
|
@@ -479,13 +483,13 @@
|
|
|
479
483
|
return getShortName(this);
|
|
480
484
|
};
|
|
481
485
|
function Companion_0() {
|
|
482
|
-
this.
|
|
483
|
-
this.
|
|
484
|
-
this.
|
|
485
|
-
this.
|
|
486
|
-
this.
|
|
486
|
+
this.x6a_1 = -1;
|
|
487
|
+
this.y6a_1 = 13;
|
|
488
|
+
this.z6a_1 = 52;
|
|
489
|
+
this.a6b_1 = 150;
|
|
490
|
+
this.b6b_1 = 53;
|
|
487
491
|
}
|
|
488
|
-
protoOf(Companion_0).
|
|
492
|
+
protoOf(Companion_0).c6b = function (_this__u8e3s4, playerIndex, reverse) {
|
|
489
493
|
var tmp;
|
|
490
494
|
if (reverse) {
|
|
491
495
|
tmp = _this__u8e3s4 + (53 + imul(playerIndex, 14) | 0) | 0;
|
|
@@ -506,9 +510,9 @@
|
|
|
506
510
|
CardName_initEntries();
|
|
507
511
|
return CardName_KING_instance;
|
|
508
512
|
}
|
|
509
|
-
function
|
|
513
|
+
function CardName_QUEEN_getInstance() {
|
|
510
514
|
CardName_initEntries();
|
|
511
|
-
return
|
|
515
|
+
return CardName_QUEEN_instance;
|
|
512
516
|
}
|
|
513
517
|
function CardName_JACK_getInstance() {
|
|
514
518
|
CardName_initEntries();
|
|
@@ -550,64 +554,64 @@
|
|
|
550
554
|
CardName_initEntries();
|
|
551
555
|
return CardName_TWO_instance;
|
|
552
556
|
}
|
|
553
|
-
function
|
|
557
|
+
function CardName_HIDDEN_getInstance() {
|
|
554
558
|
CardName_initEntries();
|
|
555
|
-
return
|
|
559
|
+
return CardName_HIDDEN_instance;
|
|
556
560
|
}
|
|
557
561
|
function GameCard(index) {
|
|
558
|
-
this.
|
|
562
|
+
this.n6a_1 = index;
|
|
559
563
|
}
|
|
560
|
-
protoOf(GameCard).
|
|
564
|
+
protoOf(GameCard).q6a = function () {
|
|
561
565
|
var tmp;
|
|
562
|
-
var containsArg = this.
|
|
566
|
+
var containsArg = this.n6a_1;
|
|
563
567
|
if (0 <= containsArg ? containsArg <= 13 : false) {
|
|
564
568
|
tmp = Suit_DIAMOND_getInstance();
|
|
565
569
|
} else {
|
|
566
|
-
if (this.
|
|
570
|
+
if (this.n6a_1 <= 26) {
|
|
567
571
|
tmp = Suit_SPADE_getInstance();
|
|
568
572
|
} else {
|
|
569
|
-
if (this.
|
|
573
|
+
if (this.n6a_1 <= 39) {
|
|
570
574
|
tmp = Suit_HEART_getInstance();
|
|
571
575
|
} else {
|
|
572
|
-
if (this.
|
|
576
|
+
if (this.n6a_1 <= 52) {
|
|
573
577
|
tmp = Suit_CLUB_getInstance();
|
|
574
578
|
} else {
|
|
575
|
-
throw IllegalStateException_init_$Create$('Invalid suitCard in Card.getValue() ' + this.
|
|
579
|
+
throw IllegalStateException_init_$Create$('Invalid suitCard in Card.getValue() ' + this.n6a_1);
|
|
576
580
|
}
|
|
577
581
|
}
|
|
578
582
|
}
|
|
579
583
|
}
|
|
580
584
|
return tmp;
|
|
581
585
|
};
|
|
582
|
-
protoOf(GameCard).
|
|
586
|
+
protoOf(GameCard).r6a = function () {
|
|
583
587
|
var tmp;
|
|
584
|
-
if (this.
|
|
588
|
+
if (this.w6a()) {
|
|
585
589
|
tmp = -1;
|
|
586
590
|
} else {
|
|
587
|
-
tmp = this.
|
|
591
|
+
tmp = this.n6a_1 - imul(13, getIndex(this.q6a())) | 0;
|
|
588
592
|
}
|
|
589
593
|
return tmp;
|
|
590
594
|
};
|
|
591
|
-
protoOf(GameCard).
|
|
592
|
-
return this.
|
|
595
|
+
protoOf(GameCard).s2 = function () {
|
|
596
|
+
return this.w6a() ? CardName_HIDDEN_getInstance() : getName(Companion_instance_0, this.r6a());
|
|
593
597
|
};
|
|
594
|
-
protoOf(GameCard).
|
|
595
|
-
return !_get_isShirt__vd98rp(this) && !this.
|
|
598
|
+
protoOf(GameCard).p6a = function () {
|
|
599
|
+
return !_get_isShirt__vd98rp(this) && !this.w6a();
|
|
596
600
|
};
|
|
597
|
-
protoOf(GameCard).
|
|
598
|
-
return this.
|
|
601
|
+
protoOf(GameCard).w6a = function () {
|
|
602
|
+
return this.n6a_1 >= 53 && this.n6a_1 <= 105;
|
|
599
603
|
};
|
|
600
604
|
protoOf(GameCard).toString = function () {
|
|
601
605
|
if (_get_isShirt__vd98rp(this)) {
|
|
602
|
-
return 'GameCard(SHIRT)';
|
|
606
|
+
return 'GameCard(SHIRT, ' + this.n6a_1 + ')';
|
|
603
607
|
}
|
|
604
|
-
if (this.
|
|
605
|
-
return 'GameCard(
|
|
608
|
+
if (this.w6a()) {
|
|
609
|
+
return 'GameCard(HIDDEN, ' + this.n6a_1 + ')';
|
|
606
610
|
}
|
|
607
|
-
return 'GameCard(' + this.
|
|
611
|
+
return 'GameCard(' + this.q6a().toString() + this.s2().toString() + ', ' + this.n6a_1 + ')';
|
|
608
612
|
};
|
|
609
613
|
protoOf(GameCard).hashCode = function () {
|
|
610
|
-
return this.
|
|
614
|
+
return this.n6a_1;
|
|
611
615
|
};
|
|
612
616
|
protoOf(GameCard).equals = function (other) {
|
|
613
617
|
if (this === other)
|
|
@@ -615,12 +619,12 @@
|
|
|
615
619
|
if (!(other instanceof GameCard))
|
|
616
620
|
return false;
|
|
617
621
|
var tmp0_other_with_cast = other instanceof GameCard ? other : THROW_CCE();
|
|
618
|
-
if (!(this.
|
|
622
|
+
if (!(this.n6a_1 === tmp0_other_with_cast.n6a_1))
|
|
619
623
|
return false;
|
|
620
624
|
return true;
|
|
621
625
|
};
|
|
622
626
|
function _get_$cachedSerializer__te6jhj($this) {
|
|
623
|
-
return $this.
|
|
627
|
+
return $this.f6b_1.u();
|
|
624
628
|
}
|
|
625
629
|
function Suit$Companion$_anonymous__cbm2iq() {
|
|
626
630
|
return createSimpleEnumSerializer('io.raspberryapps.card_game.core.data.models.cards.Suit', values());
|
|
@@ -631,7 +635,7 @@
|
|
|
631
635
|
var Suit_CLUB_instance;
|
|
632
636
|
function getSuitEmoji($this) {
|
|
633
637
|
var tmp;
|
|
634
|
-
switch ($this.
|
|
638
|
+
switch ($this.r2_1) {
|
|
635
639
|
case 0:
|
|
636
640
|
tmp = '\u2666\uFE0F';
|
|
637
641
|
break;
|
|
@@ -662,13 +666,13 @@
|
|
|
662
666
|
Companion_instance_1 = this;
|
|
663
667
|
var tmp = this;
|
|
664
668
|
var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
665
|
-
tmp.
|
|
669
|
+
tmp.f6b_1 = lazy(tmp_0, Suit$Companion$_anonymous__cbm2iq);
|
|
666
670
|
}
|
|
667
|
-
protoOf(Companion_1).
|
|
671
|
+
protoOf(Companion_1).u50 = function () {
|
|
668
672
|
return _get_$cachedSerializer__te6jhj(this);
|
|
669
673
|
};
|
|
670
|
-
protoOf(Companion_1).
|
|
671
|
-
return this.
|
|
674
|
+
protoOf(Companion_1).r4k = function (typeParamsSerializers) {
|
|
675
|
+
return this.u50();
|
|
672
676
|
};
|
|
673
677
|
var Companion_instance_1;
|
|
674
678
|
function Companion_getInstance_1() {
|
|
@@ -713,7 +717,7 @@
|
|
|
713
717
|
}
|
|
714
718
|
function getIndex(_this__u8e3s4) {
|
|
715
719
|
var tmp;
|
|
716
|
-
switch (_this__u8e3s4.
|
|
720
|
+
switch (_this__u8e3s4.r2_1) {
|
|
717
721
|
case 0:
|
|
718
722
|
tmp = 0;
|
|
719
723
|
break;
|
|
@@ -763,9 +767,9 @@
|
|
|
763
767
|
}
|
|
764
768
|
function getRandomOrgCards($this, leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundsCount, userData, signed, $completion) {
|
|
765
769
|
var tmp = new $getRandomOrgCardsCOROUTINE$1($this, leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundsCount, userData, signed, $completion);
|
|
766
|
-
tmp.
|
|
767
|
-
tmp.
|
|
768
|
-
return tmp.
|
|
770
|
+
tmp.l9_1 = Unit_instance;
|
|
771
|
+
tmp.m9_1 = null;
|
|
772
|
+
return tmp.r9();
|
|
769
773
|
}
|
|
770
774
|
function normalizeCards($this, cards, leftCardIndexForEachSuit) {
|
|
771
775
|
var oneSuitCount = cards.m() / get_entries().m() | 0;
|
|
@@ -786,7 +790,7 @@
|
|
|
786
790
|
}
|
|
787
791
|
function Companion_2() {
|
|
788
792
|
}
|
|
789
|
-
protoOf(Companion_2).
|
|
793
|
+
protoOf(Companion_2).j6c = function (randomPoolProvider, logger) {
|
|
790
794
|
var tmp17_random = new SecureRandom(logger);
|
|
791
795
|
return new CardsDealerProviderImpl(tmp17_random, randomPoolProvider, logger);
|
|
792
796
|
};
|
|
@@ -796,41 +800,41 @@
|
|
|
796
800
|
}
|
|
797
801
|
function $createNewShuffledCardDeckCOROUTINE$0(_this__u8e3s4, leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundCountForGame, userData, provider, resultContinuation) {
|
|
798
802
|
CoroutineImpl.call(this, resultContinuation);
|
|
799
|
-
this.
|
|
800
|
-
this.
|
|
801
|
-
this.
|
|
802
|
-
this.
|
|
803
|
-
this.
|
|
804
|
-
this.
|
|
805
|
-
}
|
|
806
|
-
protoOf($createNewShuffledCardDeckCOROUTINE$0).
|
|
807
|
-
var suspendResult = this.
|
|
803
|
+
this.s6c_1 = _this__u8e3s4;
|
|
804
|
+
this.t6c_1 = leftCardIndexForEachSuit;
|
|
805
|
+
this.u6c_1 = rightCardIndexForEachSuit;
|
|
806
|
+
this.v6c_1 = approximateRoundCountForGame;
|
|
807
|
+
this.w6c_1 = userData;
|
|
808
|
+
this.x6c_1 = provider;
|
|
809
|
+
}
|
|
810
|
+
protoOf($createNewShuffledCardDeckCOROUTINE$0).r9 = function () {
|
|
811
|
+
var suspendResult = this.l9_1;
|
|
808
812
|
$sm: do
|
|
809
813
|
try {
|
|
810
|
-
var tmp = this.
|
|
814
|
+
var tmp = this.j9_1;
|
|
811
815
|
switch (tmp) {
|
|
812
816
|
case 0:
|
|
813
|
-
this.
|
|
814
|
-
this.
|
|
815
|
-
this.
|
|
816
|
-
if (this.
|
|
817
|
+
this.k9_1 = 4;
|
|
818
|
+
this.y6c_1 = this.x6c_1;
|
|
819
|
+
this.z6c_1 = this.y6c_1.r2_1;
|
|
820
|
+
if (this.z6c_1 === 0) {
|
|
817
821
|
var tmp_0 = this;
|
|
818
|
-
var it = this.
|
|
819
|
-
tmp_0.
|
|
820
|
-
this.
|
|
822
|
+
var it = this.s6c_1.g6b(this.t6c_1, this.u6c_1);
|
|
823
|
+
tmp_0.a6d_1 = this.s6c_1.k6b(it);
|
|
824
|
+
this.j9_1 = 3;
|
|
821
825
|
continue $sm;
|
|
822
826
|
} else {
|
|
823
|
-
if (this.
|
|
824
|
-
this.
|
|
825
|
-
suspendResult = getRandomOrgCards(this.
|
|
827
|
+
if (this.z6c_1 === 1) {
|
|
828
|
+
this.j9_1 = 2;
|
|
829
|
+
suspendResult = getRandomOrgCards(this.s6c_1, this.t6c_1, this.u6c_1, this.v6c_1, this.w6c_1, false, this);
|
|
826
830
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
827
831
|
return suspendResult;
|
|
828
832
|
}
|
|
829
833
|
continue $sm;
|
|
830
834
|
} else {
|
|
831
|
-
if (this.
|
|
832
|
-
this.
|
|
833
|
-
suspendResult = getRandomOrgCards(this.
|
|
835
|
+
if (this.z6c_1 === 2) {
|
|
836
|
+
this.j9_1 = 1;
|
|
837
|
+
suspendResult = getRandomOrgCards(this.s6c_1, this.t6c_1, this.u6c_1, this.v6c_1, this.w6c_1, true, this);
|
|
834
838
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
835
839
|
return suspendResult;
|
|
836
840
|
}
|
|
@@ -844,86 +848,86 @@
|
|
|
844
848
|
|
|
845
849
|
break;
|
|
846
850
|
case 1:
|
|
847
|
-
this.
|
|
848
|
-
this.
|
|
851
|
+
this.a6d_1 = suspendResult;
|
|
852
|
+
this.j9_1 = 3;
|
|
849
853
|
continue $sm;
|
|
850
854
|
case 2:
|
|
851
|
-
this.
|
|
852
|
-
this.
|
|
855
|
+
this.a6d_1 = suspendResult;
|
|
856
|
+
this.j9_1 = 3;
|
|
853
857
|
continue $sm;
|
|
854
858
|
case 3:
|
|
855
|
-
return this.
|
|
859
|
+
return this.a6d_1;
|
|
856
860
|
case 4:
|
|
857
|
-
throw this.
|
|
861
|
+
throw this.m9_1;
|
|
858
862
|
}
|
|
859
863
|
} catch ($p) {
|
|
860
864
|
var e = $p;
|
|
861
|
-
if (this.
|
|
865
|
+
if (this.k9_1 === 4) {
|
|
862
866
|
throw e;
|
|
863
867
|
} else {
|
|
864
|
-
this.
|
|
865
|
-
this.
|
|
868
|
+
this.j9_1 = this.k9_1;
|
|
869
|
+
this.m9_1 = e;
|
|
866
870
|
}
|
|
867
871
|
}
|
|
868
872
|
while (true);
|
|
869
873
|
};
|
|
870
874
|
function $getRandomOrgCardsCOROUTINE$1(_this__u8e3s4, leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundsCount, userData, signed, resultContinuation) {
|
|
871
875
|
CoroutineImpl.call(this, resultContinuation);
|
|
872
|
-
this.
|
|
873
|
-
this.
|
|
874
|
-
this.
|
|
875
|
-
this.
|
|
876
|
-
this.
|
|
877
|
-
this.
|
|
878
|
-
}
|
|
879
|
-
protoOf($getRandomOrgCardsCOROUTINE$1).
|
|
880
|
-
var suspendResult = this.
|
|
876
|
+
this.w6b_1 = _this__u8e3s4;
|
|
877
|
+
this.x6b_1 = leftCardIndexForEachSuit;
|
|
878
|
+
this.y6b_1 = rightCardIndexForEachSuit;
|
|
879
|
+
this.z6b_1 = approximateRoundsCount;
|
|
880
|
+
this.a6c_1 = userData;
|
|
881
|
+
this.b6c_1 = signed;
|
|
882
|
+
}
|
|
883
|
+
protoOf($getRandomOrgCardsCOROUTINE$1).r9 = function () {
|
|
884
|
+
var suspendResult = this.l9_1;
|
|
881
885
|
$sm: do
|
|
882
886
|
try {
|
|
883
|
-
var tmp = this.
|
|
887
|
+
var tmp = this.j9_1;
|
|
884
888
|
switch (tmp) {
|
|
885
889
|
case 0:
|
|
886
|
-
this.
|
|
887
|
-
this.
|
|
888
|
-
this.
|
|
889
|
-
this.
|
|
890
|
-
this.
|
|
891
|
-
suspendResult = this.
|
|
890
|
+
this.k9_1 = 5;
|
|
891
|
+
this.c6c_1 = this.w6b_1.n6b(this.x6b_1, this.y6b_1);
|
|
892
|
+
this.d6c_1 = this.w6b_1.c6d_1;
|
|
893
|
+
this.e6c_1 = this.c6c_1 - 1 | 0;
|
|
894
|
+
this.j9_1 = 1;
|
|
895
|
+
suspendResult = this.d6c_1.a5v(this.z6b_1, this.a6c_1, 0, this.e6c_1, this.c6c_1, this.b6c_1, VOID, this);
|
|
892
896
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
893
897
|
return suspendResult;
|
|
894
898
|
}
|
|
895
899
|
|
|
896
|
-
this.
|
|
900
|
+
this.j9_1 = 2;
|
|
897
901
|
continue $sm;
|
|
898
902
|
case 1:
|
|
899
|
-
this.
|
|
900
|
-
suspendResult = new Result(this.
|
|
901
|
-
this.
|
|
903
|
+
this.f6c_1 = suspendResult.sk_1;
|
|
904
|
+
suspendResult = new Result(this.f6c_1);
|
|
905
|
+
this.j9_1 = 2;
|
|
902
906
|
continue $sm;
|
|
903
907
|
case 2:
|
|
904
|
-
this.
|
|
905
|
-
if (_Result___get_isSuccess__impl__sndoy8(this.
|
|
908
|
+
this.g6c_1 = suspendResult.sk_1;
|
|
909
|
+
if (_Result___get_isSuccess__impl__sndoy8(this.g6c_1)) {
|
|
906
910
|
var tmp_0 = this;
|
|
907
|
-
var this_0 = this.
|
|
911
|
+
var this_0 = this.g6c_1;
|
|
908
912
|
throwOnFailure(this_0);
|
|
909
913
|
var tmp_1 = _Result___get_value__impl__bjfvqg(this_0);
|
|
910
914
|
var tmp14_cards = ((tmp_1 == null ? true : !(tmp_1 == null)) ? tmp_1 : THROW_CCE()).cards;
|
|
911
|
-
var this_1 = normalizeCards(this.
|
|
915
|
+
var this_1 = normalizeCards(this.w6b_1, tmp14_cards, this.x6b_1);
|
|
912
916
|
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_1, 10));
|
|
913
917
|
var tmp0_iterator = this_1.j();
|
|
914
918
|
while (tmp0_iterator.k()) {
|
|
915
919
|
var item = tmp0_iterator.l();
|
|
916
|
-
destination.e(Companion_instance.
|
|
920
|
+
destination.e(Companion_instance.u6a(item));
|
|
917
921
|
}
|
|
918
|
-
tmp_0.
|
|
919
|
-
this.
|
|
922
|
+
tmp_0.h6c_1 = destination;
|
|
923
|
+
this.j9_1 = 4;
|
|
920
924
|
continue $sm;
|
|
921
925
|
} else {
|
|
922
|
-
this.
|
|
923
|
-
var tmp15_safe_receiver = this.
|
|
924
|
-
this.
|
|
925
|
-
this.
|
|
926
|
-
suspendResult = this.
|
|
926
|
+
this.i6c_1 = Result__exceptionOrNull_impl_p6xea9(this.g6c_1);
|
|
927
|
+
var tmp15_safe_receiver = this.i6c_1;
|
|
928
|
+
this.w6b_1.d6d_1.v('CardsDealerProvider', 'getRandomOrgCards: ' + (tmp15_safe_receiver == null ? null : tmp15_safe_receiver.message), this.i6c_1);
|
|
929
|
+
this.j9_1 = 3;
|
|
930
|
+
suspendResult = this.w6b_1.h6b(this.x6b_1, this.y6b_1, this.z6b_1, this.a6c_1, CardsRandomProvider_CUSTOM_getInstance(), this);
|
|
927
931
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
928
932
|
return suspendResult;
|
|
929
933
|
}
|
|
@@ -931,31 +935,31 @@
|
|
|
931
935
|
}
|
|
932
936
|
|
|
933
937
|
case 3:
|
|
934
|
-
this.
|
|
935
|
-
this.
|
|
938
|
+
this.h6c_1 = suspendResult;
|
|
939
|
+
this.j9_1 = 4;
|
|
936
940
|
continue $sm;
|
|
937
941
|
case 4:
|
|
938
|
-
return this.
|
|
942
|
+
return this.h6c_1;
|
|
939
943
|
case 5:
|
|
940
|
-
throw this.
|
|
944
|
+
throw this.m9_1;
|
|
941
945
|
}
|
|
942
946
|
} catch ($p) {
|
|
943
947
|
var e = $p;
|
|
944
|
-
if (this.
|
|
948
|
+
if (this.k9_1 === 5) {
|
|
945
949
|
throw e;
|
|
946
950
|
} else {
|
|
947
|
-
this.
|
|
948
|
-
this.
|
|
951
|
+
this.j9_1 = this.k9_1;
|
|
952
|
+
this.m9_1 = e;
|
|
949
953
|
}
|
|
950
954
|
}
|
|
951
955
|
while (true);
|
|
952
956
|
};
|
|
953
957
|
function CardsDealerProviderImpl(random, randomPoolProvider, logger) {
|
|
954
|
-
this.
|
|
955
|
-
this.
|
|
956
|
-
this.
|
|
958
|
+
this.b6d_1 = random;
|
|
959
|
+
this.c6d_1 = randomPoolProvider;
|
|
960
|
+
this.d6d_1 = logger;
|
|
957
961
|
}
|
|
958
|
-
protoOf(CardsDealerProviderImpl).
|
|
962
|
+
protoOf(CardsDealerProviderImpl).g6b = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit) {
|
|
959
963
|
// Inline function 'kotlin.collections.flatMap' call
|
|
960
964
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
961
965
|
var this_0 = get_entries();
|
|
@@ -965,7 +969,7 @@
|
|
|
965
969
|
var element = tmp0_iterator.l();
|
|
966
970
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.cards.CardsDealerProviderImpl.createNewCardDeck.<anonymous>' call
|
|
967
971
|
// Inline function 'kotlin.collections.map' call
|
|
968
|
-
var this_1 = this.
|
|
972
|
+
var this_1 = this.e6d(leftCardIndexForEachSuit, rightCardIndexForEachSuit);
|
|
969
973
|
// Inline function 'kotlin.collections.mapTo' call
|
|
970
974
|
var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_1, 10));
|
|
971
975
|
var inductionVariable = this_1.a1_1;
|
|
@@ -976,7 +980,7 @@
|
|
|
976
980
|
inductionVariable = inductionVariable + 1 | 0;
|
|
977
981
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.cards.CardsDealerProviderImpl.createNewCardDeck.<anonymous>.<anonymous>' call
|
|
978
982
|
var it = item;
|
|
979
|
-
var tmp$ret$0 = Companion_instance.
|
|
983
|
+
var tmp$ret$0 = Companion_instance.s6a(element, it);
|
|
980
984
|
destination_0.e(tmp$ret$0);
|
|
981
985
|
}
|
|
982
986
|
while (!(item === last));
|
|
@@ -985,10 +989,10 @@
|
|
|
985
989
|
}
|
|
986
990
|
return destination;
|
|
987
991
|
};
|
|
988
|
-
protoOf(CardsDealerProviderImpl).
|
|
992
|
+
protoOf(CardsDealerProviderImpl).e6d = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit) {
|
|
989
993
|
return until(leftCardIndexForEachSuit, 13 - rightCardIndexForEachSuit | 0);
|
|
990
994
|
};
|
|
991
|
-
protoOf(CardsDealerProviderImpl).
|
|
995
|
+
protoOf(CardsDealerProviderImpl).n6b = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit) {
|
|
992
996
|
// Inline function 'kotlin.collections.sumOf' call
|
|
993
997
|
var sum = 0;
|
|
994
998
|
var tmp0_iterator = get_entries().j();
|
|
@@ -996,17 +1000,17 @@
|
|
|
996
1000
|
var element = tmp0_iterator.l();
|
|
997
1001
|
var tmp = sum;
|
|
998
1002
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.cards.CardsDealerProviderImpl.getCardsCount.<anonymous>' call
|
|
999
|
-
sum = tmp + count(this.
|
|
1003
|
+
sum = tmp + count(this.e6d(leftCardIndexForEachSuit, rightCardIndexForEachSuit)) | 0;
|
|
1000
1004
|
}
|
|
1001
1005
|
return sum;
|
|
1002
1006
|
};
|
|
1003
|
-
protoOf(CardsDealerProviderImpl).
|
|
1007
|
+
protoOf(CardsDealerProviderImpl).h6b = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundCountForGame, userData, provider, $completion) {
|
|
1004
1008
|
var tmp = new $createNewShuffledCardDeckCOROUTINE$0(this, leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundCountForGame, userData, provider, $completion);
|
|
1005
|
-
tmp.
|
|
1006
|
-
tmp.
|
|
1007
|
-
return tmp.
|
|
1009
|
+
tmp.l9_1 = Unit_instance;
|
|
1010
|
+
tmp.m9_1 = null;
|
|
1011
|
+
return tmp.r9();
|
|
1008
1012
|
};
|
|
1009
|
-
protoOf(CardsDealerProviderImpl).
|
|
1013
|
+
protoOf(CardsDealerProviderImpl).i6b = function (count, cards) {
|
|
1010
1014
|
// Inline function 'kotlin.apply' call
|
|
1011
1015
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
1012
1016
|
var this_0 = ArrayList_init_$Create$();
|
|
@@ -1019,7 +1023,7 @@
|
|
|
1019
1023
|
if (this_0.m() === count) {
|
|
1020
1024
|
break $l$block;
|
|
1021
1025
|
}
|
|
1022
|
-
var hasSimilarCard = this_0.
|
|
1026
|
+
var hasSimilarCard = this_0.v1(card);
|
|
1023
1027
|
if (hasSimilarCard) {
|
|
1024
1028
|
continue $l$loop_0;
|
|
1025
1029
|
}
|
|
@@ -1040,7 +1044,7 @@
|
|
|
1040
1044
|
while (tmp0_iterator.k()) {
|
|
1041
1045
|
var element = tmp0_iterator.l();
|
|
1042
1046
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.cards.CardsDealerProviderImpl.getNRandomUniqueCards.<anonymous>.<anonymous>' call
|
|
1043
|
-
if (element.
|
|
1047
|
+
if (element.r6a() === card.r6a()) {
|
|
1044
1048
|
tmp$ret$2 = true;
|
|
1045
1049
|
break $l$block_1;
|
|
1046
1050
|
}
|
|
@@ -1055,7 +1059,7 @@
|
|
|
1055
1059
|
}
|
|
1056
1060
|
return this_0;
|
|
1057
1061
|
};
|
|
1058
|
-
protoOf(CardsDealerProviderImpl).
|
|
1062
|
+
protoOf(CardsDealerProviderImpl).j6b = function (cards, times) {
|
|
1059
1063
|
// Inline function 'kotlin.let' call
|
|
1060
1064
|
// Inline function 'kotlin.contracts.contract' call
|
|
1061
1065
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.cards.CardsDealerProviderImpl.standardShuffledCards.<anonymous>' call
|
|
@@ -1065,65 +1069,65 @@
|
|
|
1065
1069
|
do {
|
|
1066
1070
|
var i = inductionVariable;
|
|
1067
1071
|
inductionVariable = inductionVariable + 1 | 0;
|
|
1068
|
-
shuffled = this.
|
|
1072
|
+
shuffled = this.b6d_1.k60(shuffled);
|
|
1069
1073
|
}
|
|
1070
1074
|
while (inductionVariable < times);
|
|
1071
1075
|
return shuffled;
|
|
1072
1076
|
};
|
|
1073
|
-
protoOf(CardsDealerProviderImpl).
|
|
1074
|
-
return toList(overhand(riffle(toMutableList(cards), times, this.
|
|
1077
|
+
protoOf(CardsDealerProviderImpl).l6b = function (cards, times) {
|
|
1078
|
+
return toList(overhand(riffle(toMutableList(cards), times, this.b6d_1), times, this.b6d_1));
|
|
1075
1079
|
};
|
|
1076
1080
|
function Companion_3() {
|
|
1077
1081
|
}
|
|
1078
|
-
protoOf(Companion_3).
|
|
1082
|
+
protoOf(Companion_3).f6d = function () {
|
|
1079
1083
|
// Inline function 'kotlin.apply' call
|
|
1080
1084
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
1081
1085
|
var this_0 = ArrayList_init_$Create$();
|
|
1082
1086
|
// Inline function 'kotlin.contracts.contract' call
|
|
1083
1087
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.cards.Companion.getCards.<anonymous>' call
|
|
1084
|
-
this_0.n(listOf([Companion_instance.
|
|
1085
|
-
this_0.n(listOf([Companion_instance.
|
|
1086
|
-
this_0.n(listOf([Companion_instance.
|
|
1087
|
-
this_0.n(listOf([Companion_instance.
|
|
1088
|
-
this_0.n(listOf([Companion_instance.
|
|
1088
|
+
this_0.n(listOf([Companion_instance.t6a(Suit_DIAMOND_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.t6a(Suit_CLUB_getInstance(), CardName_NINE_getInstance()), Companion_instance.t6a(Suit_CLUB_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.t6a(Suit_CLUB_getInstance(), CardName_TEN_getInstance()), Companion_instance.t6a(Suit_HEART_getInstance(), CardName_JACK_getInstance()), Companion_instance.t6a(Suit_HEART_getInstance(), CardName_KING_getInstance())]));
|
|
1089
|
+
this_0.n(listOf([Companion_instance.t6a(Suit_CLUB_getInstance(), CardName_JACK_getInstance()), Companion_instance.t6a(Suit_SPADE_getInstance(), CardName_ACE_getInstance()), Companion_instance.t6a(Suit_DIAMOND_getInstance(), CardName_NINE_getInstance()), Companion_instance.t6a(Suit_DIAMOND_getInstance(), CardName_TEN_getInstance()), Companion_instance.t6a(Suit_DIAMOND_getInstance(), CardName_JACK_getInstance()), Companion_instance.t6a(Suit_HEART_getInstance(), CardName_EIGHT_getInstance())]));
|
|
1090
|
+
this_0.n(listOf([Companion_instance.t6a(Suit_CLUB_getInstance(), CardName_QUEEN_getInstance()), Companion_instance.t6a(Suit_HEART_getInstance(), CardName_ACE_getInstance()), Companion_instance.t6a(Suit_HEART_getInstance(), CardName_QUEEN_getInstance()), Companion_instance.t6a(Suit_HEART_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.t6a(Suit_SPADE_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.t6a(Suit_CLUB_getInstance(), CardName_KING_getInstance())]));
|
|
1091
|
+
this_0.n(listOf([Companion_instance.t6a(Suit_SPADE_getInstance(), CardName_EIGHT_getInstance()), Companion_instance.t6a(Suit_SPADE_getInstance(), CardName_TEN_getInstance()), Companion_instance.t6a(Suit_HEART_getInstance(), CardName_TEN_getInstance()), Companion_instance.t6a(Suit_SPADE_getInstance(), CardName_JACK_getInstance()), Companion_instance.t6a(Suit_DIAMOND_getInstance(), CardName_EIGHT_getInstance()), Companion_instance.t6a(Suit_SPADE_getInstance(), CardName_QUEEN_getInstance())]));
|
|
1092
|
+
this_0.n(listOf([Companion_instance.t6a(Suit_DIAMOND_getInstance(), CardName_ACE_getInstance()), Companion_instance.t6a(Suit_CLUB_getInstance(), CardName_EIGHT_getInstance()), Companion_instance.t6a(Suit_DIAMOND_getInstance(), CardName_KING_getInstance()), Companion_instance.t6a(Suit_SPADE_getInstance(), CardName_NINE_getInstance()), Companion_instance.t6a(Suit_CLUB_getInstance(), CardName_ACE_getInstance()), Companion_instance.t6a(Suit_SPADE_getInstance(), CardName_KING_getInstance()), Companion_instance.t6a(Suit_DIAMOND_getInstance(), CardName_QUEEN_getInstance()), Companion_instance.t6a(Suit_HEART_getInstance(), CardName_NINE_getInstance())]));
|
|
1089
1093
|
return this_0;
|
|
1090
1094
|
};
|
|
1091
|
-
protoOf(Companion_3).
|
|
1092
|
-
return listOf([Companion_instance.
|
|
1095
|
+
protoOf(Companion_3).g6d = function () {
|
|
1096
|
+
return listOf([Companion_instance.t6a(Suit_CLUB_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.t6a(Suit_HEART_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.t6a(Suit_SPADE_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.t6a(Suit_SPADE_getInstance(), CardName_EIGHT_getInstance())]);
|
|
1093
1097
|
};
|
|
1094
1098
|
var Companion_instance_3;
|
|
1095
1099
|
function Companion_getInstance_3() {
|
|
1096
1100
|
return Companion_instance_3;
|
|
1097
1101
|
}
|
|
1098
1102
|
function FakeCardsDealerProvider(cards, cardsForLot) {
|
|
1099
|
-
cards = cards === VOID ? Companion_instance_3.
|
|
1100
|
-
cardsForLot = cardsForLot === VOID ? Companion_instance_3.
|
|
1101
|
-
this.
|
|
1102
|
-
this.
|
|
1103
|
+
cards = cards === VOID ? Companion_instance_3.f6d() : cards;
|
|
1104
|
+
cardsForLot = cardsForLot === VOID ? Companion_instance_3.g6d() : cardsForLot;
|
|
1105
|
+
this.h6d_1 = cards;
|
|
1106
|
+
this.i6d_1 = cardsForLot;
|
|
1103
1107
|
}
|
|
1104
|
-
protoOf(FakeCardsDealerProvider).
|
|
1105
|
-
return this.
|
|
1108
|
+
protoOf(FakeCardsDealerProvider).g6b = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit) {
|
|
1109
|
+
return this.h6d_1;
|
|
1106
1110
|
};
|
|
1107
|
-
protoOf(FakeCardsDealerProvider).
|
|
1108
|
-
return this.
|
|
1111
|
+
protoOf(FakeCardsDealerProvider).h6b = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundCountForGame, userData, provider, $completion) {
|
|
1112
|
+
return this.h6d_1;
|
|
1109
1113
|
};
|
|
1110
|
-
protoOf(FakeCardsDealerProvider).
|
|
1111
|
-
return this.
|
|
1114
|
+
protoOf(FakeCardsDealerProvider).i6b = function (count, cards) {
|
|
1115
|
+
return this.i6d_1;
|
|
1112
1116
|
};
|
|
1113
|
-
protoOf(FakeCardsDealerProvider).
|
|
1117
|
+
protoOf(FakeCardsDealerProvider).j6b = function (cards, times) {
|
|
1114
1118
|
return cards;
|
|
1115
1119
|
};
|
|
1116
|
-
protoOf(FakeCardsDealerProvider).
|
|
1120
|
+
protoOf(FakeCardsDealerProvider).l6b = function (cards, times) {
|
|
1117
1121
|
return cards;
|
|
1118
1122
|
};
|
|
1119
|
-
protoOf(FakeCardsDealerProvider).
|
|
1120
|
-
return this.
|
|
1123
|
+
protoOf(FakeCardsDealerProvider).n6b = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit) {
|
|
1124
|
+
return this.h6d_1.m();
|
|
1121
1125
|
};
|
|
1122
1126
|
function CombinationsCheckerProvider() {
|
|
1123
1127
|
}
|
|
1124
1128
|
function createCombination($this, cards, supportedCombinations) {
|
|
1125
1129
|
var size = cards.m();
|
|
1126
|
-
if (supportedCombinations.
|
|
1130
|
+
if (supportedCombinations.v1(size)) {
|
|
1127
1131
|
return cards;
|
|
1128
1132
|
}
|
|
1129
1133
|
var fromLongestCombinations = asReversed(sorted(supportedCombinations));
|
|
@@ -1145,23 +1149,23 @@
|
|
|
1145
1149
|
return takeLast(cards, longestCombinationSupport);
|
|
1146
1150
|
}
|
|
1147
1151
|
function sam$kotlin_Comparator$0(function_0) {
|
|
1148
|
-
this.
|
|
1152
|
+
this.o6d_1 = function_0;
|
|
1149
1153
|
}
|
|
1150
|
-
protoOf(sam$kotlin_Comparator$0).
|
|
1151
|
-
return this.
|
|
1154
|
+
protoOf(sam$kotlin_Comparator$0).rc = function (a, b) {
|
|
1155
|
+
return this.o6d_1(a, b);
|
|
1152
1156
|
};
|
|
1153
1157
|
protoOf(sam$kotlin_Comparator$0).compare = function (a, b) {
|
|
1154
|
-
return this.
|
|
1158
|
+
return this.rc(a, b);
|
|
1155
1159
|
};
|
|
1156
|
-
protoOf(sam$kotlin_Comparator$0).
|
|
1157
|
-
return this.
|
|
1160
|
+
protoOf(sam$kotlin_Comparator$0).t3 = function () {
|
|
1161
|
+
return this.o6d_1;
|
|
1158
1162
|
};
|
|
1159
1163
|
protoOf(sam$kotlin_Comparator$0).equals = function (other) {
|
|
1160
1164
|
var tmp;
|
|
1161
1165
|
if (!(other == null) ? isInterface(other, Comparator) : false) {
|
|
1162
1166
|
var tmp_0;
|
|
1163
1167
|
if (!(other == null) ? isInterface(other, FunctionAdapter) : false) {
|
|
1164
|
-
tmp_0 = equals(this.
|
|
1168
|
+
tmp_0 = equals(this.t3(), other.t3());
|
|
1165
1169
|
} else {
|
|
1166
1170
|
tmp_0 = false;
|
|
1167
1171
|
}
|
|
@@ -1172,19 +1176,19 @@
|
|
|
1172
1176
|
return tmp;
|
|
1173
1177
|
};
|
|
1174
1178
|
protoOf(sam$kotlin_Comparator$0).hashCode = function () {
|
|
1175
|
-
return hashCode(this.
|
|
1179
|
+
return hashCode(this.t3());
|
|
1176
1180
|
};
|
|
1177
1181
|
function CombinationsCheckerProviderImpl$createCombinationsFromCardsInRow$lambda(a, b) {
|
|
1178
1182
|
// Inline function 'kotlin.comparisons.compareValuesBy' call
|
|
1179
1183
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.combinations.CombinationsCheckerProviderImpl.createCombinationsFromCardsInRow.<anonymous>' call
|
|
1180
|
-
var tmp = first_0(a).
|
|
1184
|
+
var tmp = first_0(a).n6a_1;
|
|
1181
1185
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.combinations.CombinationsCheckerProviderImpl.createCombinationsFromCardsInRow.<anonymous>' call
|
|
1182
|
-
var tmp$ret$1 = first_0(b).
|
|
1186
|
+
var tmp$ret$1 = first_0(b).n6a_1;
|
|
1183
1187
|
return compareValues(tmp, tmp$ret$1);
|
|
1184
1188
|
}
|
|
1185
1189
|
function CombinationsCheckerProviderImpl() {
|
|
1186
1190
|
}
|
|
1187
|
-
protoOf(CombinationsCheckerProviderImpl).
|
|
1191
|
+
protoOf(CombinationsCheckerProviderImpl).j6d = function (cards, supportedCombinations, checkFromIndex, includeCardNames, suit) {
|
|
1188
1192
|
// Inline function 'kotlin.collections.filter' call
|
|
1189
1193
|
// Inline function 'kotlin.apply' call
|
|
1190
1194
|
var this_0 = toMutableList(cards);
|
|
@@ -1197,7 +1201,7 @@
|
|
|
1197
1201
|
while (tmp0_iterator.k()) {
|
|
1198
1202
|
var element = tmp0_iterator.l();
|
|
1199
1203
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.combinations.CombinationsCheckerProviderImpl.findCardsInRowCombinations.<anonymous>' call
|
|
1200
|
-
if (element.
|
|
1204
|
+
if (element.p6a()) {
|
|
1201
1205
|
destination.e(element);
|
|
1202
1206
|
}
|
|
1203
1207
|
}
|
|
@@ -1214,16 +1218,16 @@
|
|
|
1214
1218
|
inductionVariable = inductionVariable + 1 | 0;
|
|
1215
1219
|
var previousCard = lastOrNull(combinationCards);
|
|
1216
1220
|
var currentCard = sortedByIndexCards.o(i);
|
|
1217
|
-
var isNextInRow = !(previousCard == null) && currentCard.
|
|
1218
|
-
var passedCardNamesCheck = includeCardNames == null || includeCardNames.
|
|
1219
|
-
var passedSuitCheck = suit == null || currentCard.
|
|
1221
|
+
var isNextInRow = !(previousCard == null) && currentCard.n6a_1 === (previousCard.n6a_1 + 1 | 0) && currentCard.q6a().equals(previousCard.q6a());
|
|
1222
|
+
var passedCardNamesCheck = includeCardNames == null || includeCardNames.v1(currentCard.s2());
|
|
1223
|
+
var passedSuitCheck = suit == null || currentCard.q6a().equals(suit);
|
|
1220
1224
|
if (isNextInRow && passedSuitCheck && passedCardNamesCheck) {
|
|
1221
1225
|
combinationCards.e(currentCard);
|
|
1222
1226
|
} else {
|
|
1223
1227
|
if (combinationCards.m() > (checkFromIndex - 1 | 0)) {
|
|
1224
|
-
combinations.n(this.
|
|
1228
|
+
combinations.n(this.n6d(toMutableList(combinationCards), supportedCombinations));
|
|
1225
1229
|
}
|
|
1226
|
-
combinationCards.
|
|
1230
|
+
combinationCards.d2();
|
|
1227
1231
|
if (passedSuitCheck && passedCardNamesCheck) {
|
|
1228
1232
|
combinationCards.e(currentCard);
|
|
1229
1233
|
}
|
|
@@ -1231,11 +1235,11 @@
|
|
|
1231
1235
|
}
|
|
1232
1236
|
while (inductionVariable <= last);
|
|
1233
1237
|
if (combinationCards.m() > (checkFromIndex - 1 | 0)) {
|
|
1234
|
-
combinations.n(this.
|
|
1238
|
+
combinations.n(this.n6d(toMutableList(combinationCards), supportedCombinations));
|
|
1235
1239
|
}
|
|
1236
1240
|
return combinations;
|
|
1237
1241
|
};
|
|
1238
|
-
protoOf(CombinationsCheckerProviderImpl).
|
|
1242
|
+
protoOf(CombinationsCheckerProviderImpl).l6d = function (cards, cardsCount, includeCardNames) {
|
|
1239
1243
|
// Inline function 'kotlin.collections.filter' call
|
|
1240
1244
|
// Inline function 'kotlin.collections.filter' call
|
|
1241
1245
|
// Inline function 'kotlin.apply' call
|
|
@@ -1249,7 +1253,7 @@
|
|
|
1249
1253
|
while (tmp0_iterator.k()) {
|
|
1250
1254
|
var element = tmp0_iterator.l();
|
|
1251
1255
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.combinations.CombinationsCheckerProviderImpl.findSameCardsNumberCombinations.<anonymous>' call
|
|
1252
|
-
if (element.
|
|
1256
|
+
if (element.p6a()) {
|
|
1253
1257
|
destination.e(element);
|
|
1254
1258
|
}
|
|
1255
1259
|
}
|
|
@@ -1259,7 +1263,7 @@
|
|
|
1259
1263
|
while (tmp0_iterator_0.k()) {
|
|
1260
1264
|
var element_0 = tmp0_iterator_0.l();
|
|
1261
1265
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.combinations.CombinationsCheckerProviderImpl.findSameCardsNumberCombinations.<anonymous>' call
|
|
1262
|
-
if (includeCardNames == null || includeCardNames.
|
|
1266
|
+
if (includeCardNames == null || includeCardNames.v1(element_0.s2())) {
|
|
1263
1267
|
destination_0.e(element_0);
|
|
1264
1268
|
}
|
|
1265
1269
|
}
|
|
@@ -1272,14 +1276,14 @@
|
|
|
1272
1276
|
while (tmp0_iterator_1.k()) {
|
|
1273
1277
|
var element_1 = tmp0_iterator_1.l();
|
|
1274
1278
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.combinations.CombinationsCheckerProviderImpl.findSameCardsNumberCombinations.<anonymous>' call
|
|
1275
|
-
var key = element_1.
|
|
1279
|
+
var key = element_1.r6a();
|
|
1276
1280
|
// Inline function 'kotlin.collections.getOrPut' call
|
|
1277
|
-
var value = destination_1.
|
|
1281
|
+
var value = destination_1.k2(key);
|
|
1278
1282
|
var tmp;
|
|
1279
1283
|
if (value == null) {
|
|
1280
1284
|
// Inline function 'kotlin.collections.groupByTo.<anonymous>' call
|
|
1281
1285
|
var answer = ArrayList_init_$Create$();
|
|
1282
|
-
destination_1.
|
|
1286
|
+
destination_1.n2(key, answer);
|
|
1283
1287
|
tmp = answer;
|
|
1284
1288
|
} else {
|
|
1285
1289
|
tmp = value;
|
|
@@ -1295,10 +1299,10 @@
|
|
|
1295
1299
|
var element_2 = tmp0_iterator_2.l();
|
|
1296
1300
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.combinations.CombinationsCheckerProviderImpl.findSameCardsNumberCombinations.<anonymous>' call
|
|
1297
1301
|
if (element_2.u().m() >= cardsCount) {
|
|
1298
|
-
destination_2.
|
|
1302
|
+
destination_2.n2(element_2.t(), element_2.u());
|
|
1299
1303
|
}
|
|
1300
1304
|
}
|
|
1301
|
-
var combinations = destination_2.
|
|
1305
|
+
var combinations = destination_2.m2();
|
|
1302
1306
|
// Inline function 'kotlin.collections.map' call
|
|
1303
1307
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1304
1308
|
var destination_3 = ArrayList_init_$Create$_0(collectionSizeOrDefault(combinations, 10));
|
|
@@ -1311,7 +1315,7 @@
|
|
|
1311
1315
|
}
|
|
1312
1316
|
return destination_3;
|
|
1313
1317
|
};
|
|
1314
|
-
protoOf(CombinationsCheckerProviderImpl).
|
|
1318
|
+
protoOf(CombinationsCheckerProviderImpl).n6d = function (cards, supportedCombinations) {
|
|
1315
1319
|
// Inline function 'kotlin.collections.minOf' call
|
|
1316
1320
|
var iterator = supportedCombinations.j();
|
|
1317
1321
|
if (!iterator.k())
|
|
@@ -1332,7 +1336,7 @@
|
|
|
1332
1336
|
while (cardsToCheck.m() >= shortestCombinationSupport) {
|
|
1333
1337
|
var combinationCards = createCombination(this, cardsToCheck, supportedCombinations);
|
|
1334
1338
|
combinations.e(toList(combinationCards));
|
|
1335
|
-
cardsToCheck.
|
|
1339
|
+
cardsToCheck.c2(combinationCards);
|
|
1336
1340
|
}
|
|
1337
1341
|
// Inline function 'kotlin.collections.sortedBy' call
|
|
1338
1342
|
// Inline function 'kotlin.comparisons.compareBy' call
|
|
@@ -1340,29 +1344,31 @@
|
|
|
1340
1344
|
var tmp$ret$4 = new sam$kotlin_Comparator$0(tmp);
|
|
1341
1345
|
return sortedWith(combinations, tmp$ret$4);
|
|
1342
1346
|
};
|
|
1347
|
+
function DealerReducer() {
|
|
1348
|
+
}
|
|
1343
1349
|
function DealerReducerImpl(logger, enableLogs) {
|
|
1344
|
-
this.
|
|
1345
|
-
this.
|
|
1350
|
+
this.s6d_1 = logger;
|
|
1351
|
+
this.t6d_1 = enableLogs;
|
|
1346
1352
|
}
|
|
1347
|
-
protoOf(DealerReducerImpl).
|
|
1353
|
+
protoOf(DealerReducerImpl).p6d = function (cards, cardsToRemove) {
|
|
1348
1354
|
var list = cards;
|
|
1349
1355
|
var _iterator__ex2g4s = cardsToRemove.j();
|
|
1350
1356
|
while (_iterator__ex2g4s.k()) {
|
|
1351
1357
|
var gameCard = _iterator__ex2g4s.l();
|
|
1352
|
-
list = this.
|
|
1358
|
+
list = this.q6d(list, gameCard);
|
|
1353
1359
|
}
|
|
1354
1360
|
return list;
|
|
1355
1361
|
};
|
|
1356
|
-
protoOf(DealerReducerImpl).
|
|
1362
|
+
protoOf(DealerReducerImpl).q6d = function (cards, cardToRemove) {
|
|
1357
1363
|
var tmp;
|
|
1358
|
-
if (!cardToRemove.
|
|
1359
|
-
if (this.
|
|
1360
|
-
this.
|
|
1364
|
+
if (!cardToRemove.w6a() && cards.v1(cardToRemove)) {
|
|
1365
|
+
if (this.t6d_1) {
|
|
1366
|
+
this.s6d_1.d('Dealer', 'Card removed: ' + cardToRemove.toString() + ', size: ' + (cards.m() - 1 | 0));
|
|
1361
1367
|
}
|
|
1362
1368
|
tmp = minus(cards, cardToRemove);
|
|
1363
1369
|
} else {
|
|
1364
|
-
if (this.
|
|
1365
|
-
this.
|
|
1370
|
+
if (this.t6d_1) {
|
|
1371
|
+
this.s6d_1.d('Dealer', 'Card removed as hidden: ' + cardToRemove.toString() + ', size: ' + (cards.m() - 1 | 0));
|
|
1366
1372
|
}
|
|
1367
1373
|
// Inline function 'kotlin.collections.filterNot' call
|
|
1368
1374
|
// Inline function 'kotlin.collections.filterNotTo' call
|
|
@@ -1371,11 +1377,11 @@
|
|
|
1371
1377
|
while (tmp0_iterator.k()) {
|
|
1372
1378
|
var element = tmp0_iterator.l();
|
|
1373
1379
|
// Inline function 'io.raspberryapps.card_game.core.domain.dealer.DealerReducerImpl.removeCard.<anonymous>' call
|
|
1374
|
-
if (!element.
|
|
1380
|
+
if (!element.w6a()) {
|
|
1375
1381
|
destination.e(element);
|
|
1376
1382
|
}
|
|
1377
1383
|
}
|
|
1378
|
-
var
|
|
1384
|
+
var notHiddenCards = destination;
|
|
1379
1385
|
// Inline function 'kotlin.collections.filter' call
|
|
1380
1386
|
// Inline function 'kotlin.collections.filterTo' call
|
|
1381
1387
|
var destination_0 = ArrayList_init_$Create$();
|
|
@@ -1383,36 +1389,34 @@
|
|
|
1383
1389
|
while (tmp0_iterator_0.k()) {
|
|
1384
1390
|
var element_0 = tmp0_iterator_0.l();
|
|
1385
1391
|
// Inline function 'io.raspberryapps.card_game.core.domain.dealer.DealerReducerImpl.removeCard.<anonymous>' call
|
|
1386
|
-
if (element_0.
|
|
1392
|
+
if (element_0.w6a()) {
|
|
1387
1393
|
destination_0.e(element_0);
|
|
1388
1394
|
}
|
|
1389
1395
|
}
|
|
1390
|
-
var
|
|
1391
|
-
if (
|
|
1392
|
-
this.
|
|
1396
|
+
var hiddenCards = destination_0;
|
|
1397
|
+
if (hiddenCards.p()) {
|
|
1398
|
+
this.s6d_1.w('Dealer', "Can't find card to delete for player, " + ('cards:' + toString(cards) + ', ') + ('cardToRemove: ' + cardToRemove.toString()));
|
|
1393
1399
|
}
|
|
1394
|
-
tmp = plus(
|
|
1400
|
+
tmp = plus(notHiddenCards, dropLast(hiddenCards, 1));
|
|
1395
1401
|
}
|
|
1396
1402
|
return tmp;
|
|
1397
1403
|
};
|
|
1398
|
-
protoOf(DealerReducerImpl).
|
|
1399
|
-
if (this.
|
|
1400
|
-
this.
|
|
1404
|
+
protoOf(DealerReducerImpl).r6d = function (cards, cardToAdd) {
|
|
1405
|
+
if (this.t6d_1) {
|
|
1406
|
+
this.s6d_1.d('Dealer', 'Card added: ' + cardToAdd.toString() + ', size: ' + (cards.m() + 1 | 0));
|
|
1401
1407
|
}
|
|
1402
|
-
if (cards.
|
|
1403
|
-
this.
|
|
1408
|
+
if (cards.v1(cardToAdd)) {
|
|
1409
|
+
this.s6d_1.w('Dealer', 'Card already exists for player, ' + ('cards:' + toString(cards) + ', ') + ('cardToAdd: ' + cardToAdd.toString()));
|
|
1404
1410
|
}
|
|
1405
1411
|
return plus_0(cards, cardToAdd);
|
|
1406
1412
|
};
|
|
1407
|
-
function DealerReducer() {
|
|
1408
|
-
}
|
|
1409
1413
|
//region block: post-declaration
|
|
1410
|
-
protoOf(CardsDealerProviderImpl).
|
|
1411
|
-
protoOf(CardsDealerProviderImpl).
|
|
1412
|
-
protoOf(FakeCardsDealerProvider).
|
|
1413
|
-
protoOf(FakeCardsDealerProvider).
|
|
1414
|
-
protoOf(CombinationsCheckerProviderImpl).
|
|
1415
|
-
protoOf(CombinationsCheckerProviderImpl).
|
|
1414
|
+
protoOf(CardsDealerProviderImpl).k6b = standardShuffledCards$default;
|
|
1415
|
+
protoOf(CardsDealerProviderImpl).m6b = realLifeShuffledCards$default;
|
|
1416
|
+
protoOf(FakeCardsDealerProvider).k6b = standardShuffledCards$default;
|
|
1417
|
+
protoOf(FakeCardsDealerProvider).m6b = realLifeShuffledCards$default;
|
|
1418
|
+
protoOf(CombinationsCheckerProviderImpl).k6d = findCardsInRowCombinations$default;
|
|
1419
|
+
protoOf(CombinationsCheckerProviderImpl).m6d = findSameCardsNumberCombinations$default;
|
|
1416
1420
|
//endregion
|
|
1417
1421
|
//region block: init
|
|
1418
1422
|
CoreConfig_instance = new CoreConfig();
|
|
@@ -1435,11 +1439,11 @@
|
|
|
1435
1439
|
_.$jsExportAll$ = $jsExportAll$;
|
|
1436
1440
|
_.$_$ = _.$_$ || {};
|
|
1437
1441
|
_.$_$.a = CardName_ACE_getInstance;
|
|
1438
|
-
_.$_$.b =
|
|
1439
|
-
_.$_$.c =
|
|
1440
|
-
_.$_$.d =
|
|
1441
|
-
_.$_$.e =
|
|
1442
|
-
_.$_$.f =
|
|
1442
|
+
_.$_$.b = CardName_EIGHT_getInstance;
|
|
1443
|
+
_.$_$.c = CardName_JACK_getInstance;
|
|
1444
|
+
_.$_$.d = CardName_KING_getInstance;
|
|
1445
|
+
_.$_$.e = CardName_NINE_getInstance;
|
|
1446
|
+
_.$_$.f = CardName_QUEEN_getInstance;
|
|
1443
1447
|
_.$_$.g = CardName_SEVEN_getInstance;
|
|
1444
1448
|
_.$_$.h = CardName_TEN_getInstance;
|
|
1445
1449
|
_.$_$.i = CardsRandomProvider_CUSTOM_getInstance;
|