raspberry_games_server_game_logic 1.8.310 → 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 +1507 -1507
- package/Logic_Debertz-core.js +3408 -3386
- package/Logic_Debertz-core.js.map +1 -1
- package/Logic_Debertz-engine.js +15749 -15647
- package/Logic_Debertz-engine.js.map +1 -1
- package/Logic_Debertz-game_server.d.ts +55 -15
- package/Logic_Debertz-game_server.js +1531 -1429
- package/Logic_Debertz-game_server.js.map +1 -1
- package/kotlin-kotlin-stdlib.js +2851 -2609
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kotlinx-atomicfu.js +25 -25
- package/kotlinx-coroutines-core.js +2910 -2910
- 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 +306 -306
- package/raspberry-cardgame-lib-core.js.map +1 -1
- package/raspberry-cardgame-lib-logger.js +102 -102
- package/raspberry-cardgame-lib-random.js +1061 -1044
- 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.$_$.tg;
|
|
26
|
+
var Comparator = kotlin_kotlin.$_$.gg;
|
|
27
27
|
var VOID = kotlin_kotlin.$_$.f;
|
|
28
|
-
var take = kotlin_kotlin.$_$.
|
|
29
|
-
var toList = kotlin_kotlin.$_$.
|
|
30
|
-
var Unit_instance = kotlin_kotlin.$_$.
|
|
31
|
-
var takeLast = kotlin_kotlin.$_$.
|
|
28
|
+
var take = kotlin_kotlin.$_$.q9;
|
|
29
|
+
var toList = kotlin_kotlin.$_$.u9;
|
|
30
|
+
var Unit_instance = kotlin_kotlin.$_$.q5;
|
|
31
|
+
var takeLast = kotlin_kotlin.$_$.p9;
|
|
32
32
|
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.n;
|
|
33
|
-
var noWhenBranchMatchedException = kotlin_kotlin.$_$.
|
|
34
|
-
var initMetadataForCompanion = kotlin_kotlin.$_$.
|
|
33
|
+
var noWhenBranchMatchedException = kotlin_kotlin.$_$.rh;
|
|
34
|
+
var initMetadataForCompanion = kotlin_kotlin.$_$.wb;
|
|
35
35
|
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.w1;
|
|
36
|
-
var Enum = kotlin_kotlin.$_$.
|
|
37
|
-
var initMetadataForClass = kotlin_kotlin.$_$.
|
|
36
|
+
var Enum = kotlin_kotlin.$_$.jg;
|
|
37
|
+
var initMetadataForClass = kotlin_kotlin.$_$.vb;
|
|
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.$_$.ph;
|
|
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.$_$.rg;
|
|
51
|
+
var Result__exceptionOrNull_impl_p6xea9 = kotlin_kotlin.$_$.h3;
|
|
52
|
+
var throwOnFailure = kotlin_kotlin.$_$.vh;
|
|
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');
|
|
@@ -95,11 +95,11 @@
|
|
|
95
95
|
initMetadataForClass(CardsRandomProvider, 'CardsRandomProvider', VOID, Enum);
|
|
96
96
|
function standardShuffledCards$default(cards, times, $super) {
|
|
97
97
|
times = times === VOID ? 3 : times;
|
|
98
|
-
return $super === VOID ? this.
|
|
98
|
+
return $super === VOID ? this.o67(cards, times) : $super.o67.call(this, cards, times);
|
|
99
99
|
}
|
|
100
100
|
function realLifeShuffledCards$default(cards, times, $super) {
|
|
101
101
|
times = times === VOID ? 20 : times;
|
|
102
|
-
return $super === VOID ? this.
|
|
102
|
+
return $super === VOID ? this.q67(cards, times) : $super.q67.call(this, cards, times);
|
|
103
103
|
}
|
|
104
104
|
initMetadataForInterface(CardsDealerProvider, 'CardsDealerProvider', VOID, VOID, VOID, [5]);
|
|
105
105
|
initMetadataForCompanion(Companion_2);
|
|
@@ -112,12 +112,12 @@
|
|
|
112
112
|
checkFromIndex = checkFromIndex === VOID ? first(supportedCombinations) : checkFromIndex;
|
|
113
113
|
includeCardNames = includeCardNames === VOID ? null : includeCardNames;
|
|
114
114
|
suit = suit === VOID ? null : suit;
|
|
115
|
-
return $super === VOID ? this.
|
|
115
|
+
return $super === VOID ? this.o69(cards, supportedCombinations, checkFromIndex, includeCardNames, suit) : $super.o69.call(this, cards, supportedCombinations, checkFromIndex, includeCardNames, suit);
|
|
116
116
|
}
|
|
117
117
|
function findSameCardsNumberCombinations$default(cards, cardsCount, includeCardNames, $super) {
|
|
118
118
|
cardsCount = cardsCount === VOID ? 4 : cardsCount;
|
|
119
119
|
includeCardNames = includeCardNames === VOID ? null : includeCardNames;
|
|
120
|
-
return $super === VOID ? this.
|
|
120
|
+
return $super === VOID ? this.q69(cards, cardsCount, includeCardNames) : $super.q69.call(this, cards, cardsCount, includeCardNames);
|
|
121
121
|
}
|
|
122
122
|
initMetadataForInterface(CombinationsCheckerProvider, 'CombinationsCheckerProvider');
|
|
123
123
|
initMetadataForClass(sam$kotlin_Comparator$0, 'sam$kotlin_Comparator$0', VOID, VOID, [Comparator, FunctionAdapter]);
|
|
@@ -126,9 +126,9 @@
|
|
|
126
126
|
initMetadataForClass(DealerReducerImpl, 'DealerReducerImpl', VOID, VOID, [DealerReducer]);
|
|
127
127
|
//endregion
|
|
128
128
|
function CoreConfig() {
|
|
129
|
-
this.version = '0.0.
|
|
129
|
+
this.version = '0.0.50';
|
|
130
130
|
}
|
|
131
|
-
protoOf(CoreConfig).
|
|
131
|
+
protoOf(CoreConfig).s2z = function () {
|
|
132
132
|
return this.version;
|
|
133
133
|
};
|
|
134
134
|
var CoreConfig_instance;
|
|
@@ -137,12 +137,12 @@
|
|
|
137
137
|
}
|
|
138
138
|
function CardIndexComparator() {
|
|
139
139
|
}
|
|
140
|
-
protoOf(CardIndexComparator).
|
|
141
|
-
return a.
|
|
140
|
+
protoOf(CardIndexComparator).t66 = function (a, b) {
|
|
141
|
+
return a.u66_1 - b.u66_1 | 0;
|
|
142
142
|
};
|
|
143
143
|
protoOf(CardIndexComparator).compare = function (a, b) {
|
|
144
144
|
var tmp = a instanceof GameCard ? a : THROW_CCE();
|
|
145
|
-
return this.
|
|
145
|
+
return this.t66(tmp, b instanceof GameCard ? b : THROW_CCE());
|
|
146
146
|
};
|
|
147
147
|
var CardIndexComparator_instance;
|
|
148
148
|
function CardIndexComparator_getInstance() {
|
|
@@ -150,12 +150,12 @@
|
|
|
150
150
|
}
|
|
151
151
|
function CardNumberComparator() {
|
|
152
152
|
}
|
|
153
|
-
protoOf(CardNumberComparator).
|
|
154
|
-
return b.
|
|
153
|
+
protoOf(CardNumberComparator).t66 = function (a, b) {
|
|
154
|
+
return b.v66() - a.v66() | 0;
|
|
155
155
|
};
|
|
156
156
|
protoOf(CardNumberComparator).compare = function (a, b) {
|
|
157
157
|
var tmp = a instanceof GameCard ? a : THROW_CCE();
|
|
158
|
-
return this.
|
|
158
|
+
return this.t66(tmp, b instanceof GameCard ? b : THROW_CCE());
|
|
159
159
|
};
|
|
160
160
|
var CardNumberComparator_instance;
|
|
161
161
|
function CardNumberComparator_getInstance() {
|
|
@@ -163,12 +163,12 @@
|
|
|
163
163
|
}
|
|
164
164
|
function distributeCardsBottom(_this__u8e3s4, count) {
|
|
165
165
|
var cardsToDeal = toList(take(_this__u8e3s4, count));
|
|
166
|
-
_this__u8e3s4.
|
|
166
|
+
_this__u8e3s4.c2(cardsToDeal);
|
|
167
167
|
return cardsToDeal;
|
|
168
168
|
}
|
|
169
169
|
function distributeCardsTop(_this__u8e3s4, count) {
|
|
170
170
|
var cardsToDeal = toList(takeLast(_this__u8e3s4, count));
|
|
171
|
-
_this__u8e3s4.
|
|
171
|
+
_this__u8e3s4.c2(cardsToDeal);
|
|
172
172
|
return cardsToDeal;
|
|
173
173
|
}
|
|
174
174
|
function filterByCardName(_this__u8e3s4, name) {
|
|
@@ -200,7 +200,7 @@
|
|
|
200
200
|
var element = indexedObject[inductionVariable];
|
|
201
201
|
inductionVariable = inductionVariable + 1 | 0;
|
|
202
202
|
// Inline function 'io.raspberryapps.card_game.core.data.models.cards.byCardNamePredicate.<anonymous>.<anonymous>' call
|
|
203
|
-
if (p1.
|
|
203
|
+
if (p1.s2().equals(element)) {
|
|
204
204
|
tmp$ret$1 = true;
|
|
205
205
|
break $l$block;
|
|
206
206
|
}
|
|
@@ -212,7 +212,7 @@
|
|
|
212
212
|
}
|
|
213
213
|
var CardName_ACE_instance;
|
|
214
214
|
var CardName_KING_instance;
|
|
215
|
-
var
|
|
215
|
+
var CardName_QUEEN_instance;
|
|
216
216
|
var CardName_JACK_instance;
|
|
217
217
|
var CardName_TEN_instance;
|
|
218
218
|
var CardName_NINE_instance;
|
|
@@ -223,10 +223,10 @@
|
|
|
223
223
|
var CardName_FOUR_instance;
|
|
224
224
|
var CardName_TREE_instance;
|
|
225
225
|
var CardName_TWO_instance;
|
|
226
|
-
var
|
|
226
|
+
var CardName_HIDDEN_instance;
|
|
227
227
|
function getShortName($this) {
|
|
228
228
|
var tmp;
|
|
229
|
-
switch ($this.
|
|
229
|
+
switch ($this.r2_1) {
|
|
230
230
|
case 0:
|
|
231
231
|
tmp = 'A';
|
|
232
232
|
break;
|
|
@@ -234,7 +234,7 @@
|
|
|
234
234
|
tmp = 'K';
|
|
235
235
|
break;
|
|
236
236
|
case 2:
|
|
237
|
-
tmp = '
|
|
237
|
+
tmp = 'Q';
|
|
238
238
|
break;
|
|
239
239
|
case 3:
|
|
240
240
|
tmp = 'J';
|
|
@@ -267,7 +267,7 @@
|
|
|
267
267
|
tmp = '2';
|
|
268
268
|
break;
|
|
269
269
|
case 13:
|
|
270
|
-
tmp = '
|
|
270
|
+
tmp = 'HIDDEN';
|
|
271
271
|
break;
|
|
272
272
|
default:
|
|
273
273
|
noWhenBranchMatchedException();
|
|
@@ -282,7 +282,7 @@
|
|
|
282
282
|
CardName_entriesInitialized = true;
|
|
283
283
|
CardName_ACE_instance = new CardName('ACE', 0);
|
|
284
284
|
CardName_KING_instance = new CardName('KING', 1);
|
|
285
|
-
|
|
285
|
+
CardName_QUEEN_instance = new CardName('QUEEN', 2);
|
|
286
286
|
CardName_JACK_instance = new CardName('JACK', 3);
|
|
287
287
|
CardName_TEN_instance = new CardName('TEN', 4);
|
|
288
288
|
CardName_NINE_instance = new CardName('NINE', 5);
|
|
@@ -293,45 +293,45 @@
|
|
|
293
293
|
CardName_FOUR_instance = new CardName('FOUR', 10);
|
|
294
294
|
CardName_TREE_instance = new CardName('TREE', 11);
|
|
295
295
|
CardName_TWO_instance = new CardName('TWO', 12);
|
|
296
|
-
|
|
296
|
+
CardName_HIDDEN_instance = new CardName('HIDDEN', 13);
|
|
297
297
|
}
|
|
298
298
|
function Companion() {
|
|
299
299
|
}
|
|
300
|
-
protoOf(Companion).
|
|
300
|
+
protoOf(Companion).w66 = function (suit, number) {
|
|
301
301
|
return new GameCard(getNumber(Companion_instance_0, getName(Companion_instance_0, number), suit));
|
|
302
302
|
};
|
|
303
|
-
protoOf(Companion).
|
|
303
|
+
protoOf(Companion).x66 = function (suit, cardNumber) {
|
|
304
304
|
return new GameCard(getNumber(Companion_instance_0, cardNumber, suit));
|
|
305
305
|
};
|
|
306
|
-
protoOf(Companion).
|
|
306
|
+
protoOf(Companion).y66 = function (index) {
|
|
307
307
|
return new GameCard(index);
|
|
308
308
|
};
|
|
309
|
-
protoOf(Companion).
|
|
309
|
+
protoOf(Companion).z66 = function (position, playerIndex, previousHiddenCardWithMaxIndex, reverse) {
|
|
310
310
|
var tmp;
|
|
311
|
-
if (
|
|
311
|
+
if (previousHiddenCardWithMaxIndex == null) {
|
|
312
312
|
tmp = null;
|
|
313
313
|
} else {
|
|
314
314
|
// Inline function 'kotlin.takeIf' call
|
|
315
315
|
// Inline function 'kotlin.contracts.contract' call
|
|
316
316
|
var tmp_0;
|
|
317
|
-
// Inline function 'io.raspberryapps.card_game.core.data.models.cards.Companion.
|
|
318
|
-
if (
|
|
319
|
-
tmp_0 =
|
|
317
|
+
// Inline function 'io.raspberryapps.card_game.core.data.models.cards.Companion.createUniqueHiddenCard.<anonymous>' call
|
|
318
|
+
if (previousHiddenCardWithMaxIndex.a67()) {
|
|
319
|
+
tmp_0 = previousHiddenCardWithMaxIndex;
|
|
320
320
|
} else {
|
|
321
321
|
tmp_0 = null;
|
|
322
322
|
}
|
|
323
323
|
tmp = tmp_0;
|
|
324
324
|
}
|
|
325
325
|
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.
|
|
326
|
+
var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.u66_1;
|
|
327
|
+
var tmp5_safe_receiver = tmp4_safe_receiver == null ? null : Companion_instance_0.g67(tmp4_safe_receiver, playerIndex, reverse);
|
|
328
328
|
var tmp_1;
|
|
329
329
|
if (tmp5_safe_receiver == null) {
|
|
330
330
|
tmp_1 = null;
|
|
331
331
|
} else {
|
|
332
332
|
// Inline function 'kotlin.let' call
|
|
333
333
|
// Inline function 'kotlin.contracts.contract' call
|
|
334
|
-
// Inline function 'io.raspberryapps.card_game.core.data.models.cards.Companion.
|
|
334
|
+
// Inline function 'io.raspberryapps.card_game.core.data.models.cards.Companion.createUniqueHiddenCard.<anonymous>' call
|
|
335
335
|
tmp_1 = tmp5_safe_receiver + 1 | 0;
|
|
336
336
|
}
|
|
337
337
|
var tmp0_elvis_lhs = tmp_1;
|
|
@@ -345,10 +345,10 @@
|
|
|
345
345
|
var index = tmp_2;
|
|
346
346
|
return new GameCard(index);
|
|
347
347
|
};
|
|
348
|
-
protoOf(Companion).
|
|
349
|
-
|
|
348
|
+
protoOf(Companion).h67 = function (position, playerIndex, previousHiddenCardWithMaxIndex, reverse, $super) {
|
|
349
|
+
previousHiddenCardWithMaxIndex = previousHiddenCardWithMaxIndex === VOID ? null : previousHiddenCardWithMaxIndex;
|
|
350
350
|
reverse = reverse === VOID ? false : reverse;
|
|
351
|
-
return $super === VOID ? this.
|
|
351
|
+
return $super === VOID ? this.z66(position, playerIndex, previousHiddenCardWithMaxIndex, reverse) : $super.z66.call(this, position, playerIndex, previousHiddenCardWithMaxIndex, reverse);
|
|
352
352
|
};
|
|
353
353
|
var Companion_instance;
|
|
354
354
|
function Companion_getInstance() {
|
|
@@ -359,7 +359,7 @@
|
|
|
359
359
|
}
|
|
360
360
|
function getCardNumber($this, number) {
|
|
361
361
|
var tmp;
|
|
362
|
-
switch (number.
|
|
362
|
+
switch (number.r2_1) {
|
|
363
363
|
case 12:
|
|
364
364
|
tmp = 0;
|
|
365
365
|
break;
|
|
@@ -438,7 +438,7 @@
|
|
|
438
438
|
tmp = CardName_JACK_getInstance();
|
|
439
439
|
break;
|
|
440
440
|
case 10:
|
|
441
|
-
tmp =
|
|
441
|
+
tmp = CardName_QUEEN_getInstance();
|
|
442
442
|
break;
|
|
443
443
|
case 11:
|
|
444
444
|
tmp = CardName_KING_getInstance();
|
|
@@ -452,7 +452,7 @@
|
|
|
452
452
|
return tmp;
|
|
453
453
|
}
|
|
454
454
|
function _get_isShirt__vd98rp($this) {
|
|
455
|
-
return $this.
|
|
455
|
+
return $this.u66_1 >= 150 && $this.u66_1 <= 202;
|
|
456
456
|
}
|
|
457
457
|
function CardName(name, ordinal) {
|
|
458
458
|
Enum.call(this, name, ordinal);
|
|
@@ -461,13 +461,13 @@
|
|
|
461
461
|
return getShortName(this);
|
|
462
462
|
};
|
|
463
463
|
function Companion_0() {
|
|
464
|
-
this.
|
|
465
|
-
this.
|
|
466
|
-
this.
|
|
467
|
-
this.
|
|
468
|
-
this.
|
|
464
|
+
this.b67_1 = -1;
|
|
465
|
+
this.c67_1 = 13;
|
|
466
|
+
this.d67_1 = 52;
|
|
467
|
+
this.e67_1 = 150;
|
|
468
|
+
this.f67_1 = 53;
|
|
469
469
|
}
|
|
470
|
-
protoOf(Companion_0).
|
|
470
|
+
protoOf(Companion_0).g67 = function (_this__u8e3s4, playerIndex, reverse) {
|
|
471
471
|
var tmp;
|
|
472
472
|
if (reverse) {
|
|
473
473
|
tmp = _this__u8e3s4 + (53 + imul(playerIndex, 14) | 0) | 0;
|
|
@@ -488,9 +488,9 @@
|
|
|
488
488
|
CardName_initEntries();
|
|
489
489
|
return CardName_KING_instance;
|
|
490
490
|
}
|
|
491
|
-
function
|
|
491
|
+
function CardName_QUEEN_getInstance() {
|
|
492
492
|
CardName_initEntries();
|
|
493
|
-
return
|
|
493
|
+
return CardName_QUEEN_instance;
|
|
494
494
|
}
|
|
495
495
|
function CardName_JACK_getInstance() {
|
|
496
496
|
CardName_initEntries();
|
|
@@ -532,64 +532,64 @@
|
|
|
532
532
|
CardName_initEntries();
|
|
533
533
|
return CardName_TWO_instance;
|
|
534
534
|
}
|
|
535
|
-
function
|
|
535
|
+
function CardName_HIDDEN_getInstance() {
|
|
536
536
|
CardName_initEntries();
|
|
537
|
-
return
|
|
537
|
+
return CardName_HIDDEN_instance;
|
|
538
538
|
}
|
|
539
539
|
function GameCard(index) {
|
|
540
|
-
this.
|
|
540
|
+
this.u66_1 = index;
|
|
541
541
|
}
|
|
542
|
-
protoOf(GameCard).
|
|
542
|
+
protoOf(GameCard).i67 = function () {
|
|
543
543
|
var tmp;
|
|
544
|
-
var containsArg = this.
|
|
544
|
+
var containsArg = this.u66_1;
|
|
545
545
|
if (0 <= containsArg ? containsArg <= 13 : false) {
|
|
546
546
|
tmp = Suit_DIAMOND_getInstance();
|
|
547
547
|
} else {
|
|
548
|
-
if (this.
|
|
548
|
+
if (this.u66_1 <= 26) {
|
|
549
549
|
tmp = Suit_SPADE_getInstance();
|
|
550
550
|
} else {
|
|
551
|
-
if (this.
|
|
551
|
+
if (this.u66_1 <= 39) {
|
|
552
552
|
tmp = Suit_HEART_getInstance();
|
|
553
553
|
} else {
|
|
554
|
-
if (this.
|
|
554
|
+
if (this.u66_1 <= 52) {
|
|
555
555
|
tmp = Suit_CLUB_getInstance();
|
|
556
556
|
} else {
|
|
557
|
-
throw IllegalStateException_init_$Create$('Invalid suitCard in Card.getValue() ' + this.
|
|
557
|
+
throw IllegalStateException_init_$Create$('Invalid suitCard in Card.getValue() ' + this.u66_1);
|
|
558
558
|
}
|
|
559
559
|
}
|
|
560
560
|
}
|
|
561
561
|
}
|
|
562
562
|
return tmp;
|
|
563
563
|
};
|
|
564
|
-
protoOf(GameCard).
|
|
564
|
+
protoOf(GameCard).v66 = function () {
|
|
565
565
|
var tmp;
|
|
566
|
-
if (this.
|
|
566
|
+
if (this.a67()) {
|
|
567
567
|
tmp = -1;
|
|
568
568
|
} else {
|
|
569
|
-
tmp = this.
|
|
569
|
+
tmp = this.u66_1 - imul(13, getIndex(this.i67())) | 0;
|
|
570
570
|
}
|
|
571
571
|
return tmp;
|
|
572
572
|
};
|
|
573
|
-
protoOf(GameCard).
|
|
574
|
-
return this.
|
|
573
|
+
protoOf(GameCard).s2 = function () {
|
|
574
|
+
return this.a67() ? CardName_HIDDEN_getInstance() : getName(Companion_instance_0, this.v66());
|
|
575
575
|
};
|
|
576
|
-
protoOf(GameCard).
|
|
577
|
-
return !_get_isShirt__vd98rp(this) && !this.
|
|
576
|
+
protoOf(GameCard).j67 = function () {
|
|
577
|
+
return !_get_isShirt__vd98rp(this) && !this.a67();
|
|
578
578
|
};
|
|
579
|
-
protoOf(GameCard).
|
|
580
|
-
return this.
|
|
579
|
+
protoOf(GameCard).a67 = function () {
|
|
580
|
+
return this.u66_1 >= 53 && this.u66_1 <= 105;
|
|
581
581
|
};
|
|
582
582
|
protoOf(GameCard).toString = function () {
|
|
583
583
|
if (_get_isShirt__vd98rp(this)) {
|
|
584
|
-
return 'GameCard(SHIRT)';
|
|
584
|
+
return 'GameCard(SHIRT, ' + this.u66_1 + ')';
|
|
585
585
|
}
|
|
586
|
-
if (this.
|
|
587
|
-
return 'GameCard(
|
|
586
|
+
if (this.a67()) {
|
|
587
|
+
return 'GameCard(HIDDEN, ' + this.u66_1 + ')';
|
|
588
588
|
}
|
|
589
|
-
return 'GameCard(' + this.
|
|
589
|
+
return 'GameCard(' + this.i67().toString() + this.s2().toString() + ', ' + this.u66_1 + ')';
|
|
590
590
|
};
|
|
591
591
|
protoOf(GameCard).hashCode = function () {
|
|
592
|
-
return this.
|
|
592
|
+
return this.u66_1;
|
|
593
593
|
};
|
|
594
594
|
protoOf(GameCard).equals = function (other) {
|
|
595
595
|
if (this === other)
|
|
@@ -597,12 +597,12 @@
|
|
|
597
597
|
if (!(other instanceof GameCard))
|
|
598
598
|
return false;
|
|
599
599
|
var tmp0_other_with_cast = other instanceof GameCard ? other : THROW_CCE();
|
|
600
|
-
if (!(this.
|
|
600
|
+
if (!(this.u66_1 === tmp0_other_with_cast.u66_1))
|
|
601
601
|
return false;
|
|
602
602
|
return true;
|
|
603
603
|
};
|
|
604
604
|
function _get_$cachedSerializer__te6jhj($this) {
|
|
605
|
-
return $this.
|
|
605
|
+
return $this.k67_1.u();
|
|
606
606
|
}
|
|
607
607
|
function Suit$Companion$_anonymous__cbm2iq() {
|
|
608
608
|
return createSimpleEnumSerializer('io.raspberryapps.card_game.core.data.models.cards.Suit', values());
|
|
@@ -613,7 +613,7 @@
|
|
|
613
613
|
var Suit_CLUB_instance;
|
|
614
614
|
function getSuitEmoji($this) {
|
|
615
615
|
var tmp;
|
|
616
|
-
switch ($this.
|
|
616
|
+
switch ($this.r2_1) {
|
|
617
617
|
case 0:
|
|
618
618
|
tmp = '\u2666\uFE0F';
|
|
619
619
|
break;
|
|
@@ -644,13 +644,13 @@
|
|
|
644
644
|
Companion_instance_1 = this;
|
|
645
645
|
var tmp = this;
|
|
646
646
|
var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
647
|
-
tmp.
|
|
647
|
+
tmp.k67_1 = lazy(tmp_0, Suit$Companion$_anonymous__cbm2iq);
|
|
648
648
|
}
|
|
649
|
-
protoOf(Companion_1).
|
|
649
|
+
protoOf(Companion_1).b4x = function () {
|
|
650
650
|
return _get_$cachedSerializer__te6jhj(this);
|
|
651
651
|
};
|
|
652
|
-
protoOf(Companion_1).
|
|
653
|
-
return this.
|
|
652
|
+
protoOf(Companion_1).y4g = function (typeParamsSerializers) {
|
|
653
|
+
return this.b4x();
|
|
654
654
|
};
|
|
655
655
|
var Companion_instance_1;
|
|
656
656
|
function Companion_getInstance_1() {
|
|
@@ -695,7 +695,7 @@
|
|
|
695
695
|
}
|
|
696
696
|
function getIndex(_this__u8e3s4) {
|
|
697
697
|
var tmp;
|
|
698
|
-
switch (_this__u8e3s4.
|
|
698
|
+
switch (_this__u8e3s4.r2_1) {
|
|
699
699
|
case 0:
|
|
700
700
|
tmp = 0;
|
|
701
701
|
break;
|
|
@@ -745,9 +745,9 @@
|
|
|
745
745
|
}
|
|
746
746
|
function getRandomOrgCards($this, leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundsCount, userData, signed, $completion) {
|
|
747
747
|
var tmp = new $getRandomOrgCardsCOROUTINE$1($this, leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundsCount, userData, signed, $completion);
|
|
748
|
-
tmp.
|
|
749
|
-
tmp.
|
|
750
|
-
return tmp.
|
|
748
|
+
tmp.l9_1 = Unit_instance;
|
|
749
|
+
tmp.m9_1 = null;
|
|
750
|
+
return tmp.r9();
|
|
751
751
|
}
|
|
752
752
|
function normalizeCards($this, cards, leftCardIndexForEachSuit) {
|
|
753
753
|
var oneSuitCount = cards.m() / get_entries().m() | 0;
|
|
@@ -768,7 +768,7 @@
|
|
|
768
768
|
}
|
|
769
769
|
function Companion_2() {
|
|
770
770
|
}
|
|
771
|
-
protoOf(Companion_2).
|
|
771
|
+
protoOf(Companion_2).o68 = function (randomPoolProvider, logger) {
|
|
772
772
|
var tmp17_random = new SecureRandom(logger);
|
|
773
773
|
return new CardsDealerProviderImpl(tmp17_random, randomPoolProvider, logger);
|
|
774
774
|
};
|
|
@@ -778,41 +778,41 @@
|
|
|
778
778
|
}
|
|
779
779
|
function $createNewShuffledCardDeckCOROUTINE$0(_this__u8e3s4, leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundCountForGame, userData, provider, resultContinuation) {
|
|
780
780
|
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.
|
|
781
|
+
this.x68_1 = _this__u8e3s4;
|
|
782
|
+
this.y68_1 = leftCardIndexForEachSuit;
|
|
783
|
+
this.z68_1 = rightCardIndexForEachSuit;
|
|
784
|
+
this.a69_1 = approximateRoundCountForGame;
|
|
785
|
+
this.b69_1 = userData;
|
|
786
|
+
this.c69_1 = provider;
|
|
787
|
+
}
|
|
788
|
+
protoOf($createNewShuffledCardDeckCOROUTINE$0).r9 = function () {
|
|
789
|
+
var suspendResult = this.l9_1;
|
|
790
790
|
$sm: do
|
|
791
791
|
try {
|
|
792
|
-
var tmp = this.
|
|
792
|
+
var tmp = this.j9_1;
|
|
793
793
|
switch (tmp) {
|
|
794
794
|
case 0:
|
|
795
|
-
this.
|
|
796
|
-
this.
|
|
797
|
-
this.
|
|
798
|
-
if (this.
|
|
795
|
+
this.k9_1 = 4;
|
|
796
|
+
this.d69_1 = this.c69_1;
|
|
797
|
+
this.e69_1 = this.d69_1.r2_1;
|
|
798
|
+
if (this.e69_1 === 0) {
|
|
799
799
|
var tmp_0 = this;
|
|
800
|
-
var it = this.
|
|
801
|
-
tmp_0.
|
|
802
|
-
this.
|
|
800
|
+
var it = this.x68_1.l67(this.y68_1, this.z68_1);
|
|
801
|
+
tmp_0.f69_1 = this.x68_1.p67(it);
|
|
802
|
+
this.j9_1 = 3;
|
|
803
803
|
continue $sm;
|
|
804
804
|
} else {
|
|
805
|
-
if (this.
|
|
806
|
-
this.
|
|
807
|
-
suspendResult = getRandomOrgCards(this.
|
|
805
|
+
if (this.e69_1 === 1) {
|
|
806
|
+
this.j9_1 = 2;
|
|
807
|
+
suspendResult = getRandomOrgCards(this.x68_1, this.y68_1, this.z68_1, this.a69_1, this.b69_1, false, this);
|
|
808
808
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
809
809
|
return suspendResult;
|
|
810
810
|
}
|
|
811
811
|
continue $sm;
|
|
812
812
|
} else {
|
|
813
|
-
if (this.
|
|
814
|
-
this.
|
|
815
|
-
suspendResult = getRandomOrgCards(this.
|
|
813
|
+
if (this.e69_1 === 2) {
|
|
814
|
+
this.j9_1 = 1;
|
|
815
|
+
suspendResult = getRandomOrgCards(this.x68_1, this.y68_1, this.z68_1, this.a69_1, this.b69_1, true, this);
|
|
816
816
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
817
817
|
return suspendResult;
|
|
818
818
|
}
|
|
@@ -826,86 +826,86 @@
|
|
|
826
826
|
|
|
827
827
|
break;
|
|
828
828
|
case 1:
|
|
829
|
-
this.
|
|
830
|
-
this.
|
|
829
|
+
this.f69_1 = suspendResult;
|
|
830
|
+
this.j9_1 = 3;
|
|
831
831
|
continue $sm;
|
|
832
832
|
case 2:
|
|
833
|
-
this.
|
|
834
|
-
this.
|
|
833
|
+
this.f69_1 = suspendResult;
|
|
834
|
+
this.j9_1 = 3;
|
|
835
835
|
continue $sm;
|
|
836
836
|
case 3:
|
|
837
|
-
return this.
|
|
837
|
+
return this.f69_1;
|
|
838
838
|
case 4:
|
|
839
|
-
throw this.
|
|
839
|
+
throw this.m9_1;
|
|
840
840
|
}
|
|
841
841
|
} catch ($p) {
|
|
842
842
|
var e = $p;
|
|
843
|
-
if (this.
|
|
843
|
+
if (this.k9_1 === 4) {
|
|
844
844
|
throw e;
|
|
845
845
|
} else {
|
|
846
|
-
this.
|
|
847
|
-
this.
|
|
846
|
+
this.j9_1 = this.k9_1;
|
|
847
|
+
this.m9_1 = e;
|
|
848
848
|
}
|
|
849
849
|
}
|
|
850
850
|
while (true);
|
|
851
851
|
};
|
|
852
852
|
function $getRandomOrgCardsCOROUTINE$1(_this__u8e3s4, leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundsCount, userData, signed, resultContinuation) {
|
|
853
853
|
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.
|
|
854
|
+
this.b68_1 = _this__u8e3s4;
|
|
855
|
+
this.c68_1 = leftCardIndexForEachSuit;
|
|
856
|
+
this.d68_1 = rightCardIndexForEachSuit;
|
|
857
|
+
this.e68_1 = approximateRoundsCount;
|
|
858
|
+
this.f68_1 = userData;
|
|
859
|
+
this.g68_1 = signed;
|
|
860
|
+
}
|
|
861
|
+
protoOf($getRandomOrgCardsCOROUTINE$1).r9 = function () {
|
|
862
|
+
var suspendResult = this.l9_1;
|
|
863
863
|
$sm: do
|
|
864
864
|
try {
|
|
865
|
-
var tmp = this.
|
|
865
|
+
var tmp = this.j9_1;
|
|
866
866
|
switch (tmp) {
|
|
867
867
|
case 0:
|
|
868
|
-
this.
|
|
869
|
-
this.
|
|
870
|
-
this.
|
|
871
|
-
this.
|
|
872
|
-
this.
|
|
873
|
-
suspendResult = this.
|
|
868
|
+
this.k9_1 = 5;
|
|
869
|
+
this.h68_1 = this.b68_1.s67(this.c68_1, this.d68_1);
|
|
870
|
+
this.i68_1 = this.b68_1.h69_1;
|
|
871
|
+
this.j68_1 = this.h68_1 - 1 | 0;
|
|
872
|
+
this.j9_1 = 1;
|
|
873
|
+
suspendResult = this.i68_1.h5r(this.e68_1, this.f68_1, 0, this.j68_1, this.h68_1, this.g68_1, VOID, this);
|
|
874
874
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
875
875
|
return suspendResult;
|
|
876
876
|
}
|
|
877
877
|
|
|
878
|
-
this.
|
|
878
|
+
this.j9_1 = 2;
|
|
879
879
|
continue $sm;
|
|
880
880
|
case 1:
|
|
881
|
-
this.
|
|
882
|
-
suspendResult = new Result(this.
|
|
883
|
-
this.
|
|
881
|
+
this.k68_1 = suspendResult.sk_1;
|
|
882
|
+
suspendResult = new Result(this.k68_1);
|
|
883
|
+
this.j9_1 = 2;
|
|
884
884
|
continue $sm;
|
|
885
885
|
case 2:
|
|
886
|
-
this.
|
|
887
|
-
if (_Result___get_isSuccess__impl__sndoy8(this.
|
|
886
|
+
this.l68_1 = suspendResult.sk_1;
|
|
887
|
+
if (_Result___get_isSuccess__impl__sndoy8(this.l68_1)) {
|
|
888
888
|
var tmp_0 = this;
|
|
889
|
-
var this_0 = this.
|
|
889
|
+
var this_0 = this.l68_1;
|
|
890
890
|
throwOnFailure(this_0);
|
|
891
891
|
var tmp_1 = _Result___get_value__impl__bjfvqg(this_0);
|
|
892
892
|
var tmp14_cards = ((tmp_1 == null ? true : !(tmp_1 == null)) ? tmp_1 : THROW_CCE()).cards;
|
|
893
|
-
var this_1 = normalizeCards(this.
|
|
893
|
+
var this_1 = normalizeCards(this.b68_1, tmp14_cards, this.c68_1);
|
|
894
894
|
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_1, 10));
|
|
895
895
|
var tmp0_iterator = this_1.j();
|
|
896
896
|
while (tmp0_iterator.k()) {
|
|
897
897
|
var item = tmp0_iterator.l();
|
|
898
|
-
destination.e(Companion_instance.
|
|
898
|
+
destination.e(Companion_instance.y66(item));
|
|
899
899
|
}
|
|
900
|
-
tmp_0.
|
|
901
|
-
this.
|
|
900
|
+
tmp_0.m68_1 = destination;
|
|
901
|
+
this.j9_1 = 4;
|
|
902
902
|
continue $sm;
|
|
903
903
|
} else {
|
|
904
|
-
this.
|
|
905
|
-
var tmp15_safe_receiver = this.
|
|
906
|
-
this.
|
|
907
|
-
this.
|
|
908
|
-
suspendResult = this.
|
|
904
|
+
this.n68_1 = Result__exceptionOrNull_impl_p6xea9(this.l68_1);
|
|
905
|
+
var tmp15_safe_receiver = this.n68_1;
|
|
906
|
+
this.b68_1.i69_1.v('CardsDealerProvider', 'getRandomOrgCards: ' + (tmp15_safe_receiver == null ? null : tmp15_safe_receiver.message), this.n68_1);
|
|
907
|
+
this.j9_1 = 3;
|
|
908
|
+
suspendResult = this.b68_1.m67(this.c68_1, this.d68_1, this.e68_1, this.f68_1, CardsRandomProvider_CUSTOM_getInstance(), this);
|
|
909
909
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
910
910
|
return suspendResult;
|
|
911
911
|
}
|
|
@@ -913,31 +913,31 @@
|
|
|
913
913
|
}
|
|
914
914
|
|
|
915
915
|
case 3:
|
|
916
|
-
this.
|
|
917
|
-
this.
|
|
916
|
+
this.m68_1 = suspendResult;
|
|
917
|
+
this.j9_1 = 4;
|
|
918
918
|
continue $sm;
|
|
919
919
|
case 4:
|
|
920
|
-
return this.
|
|
920
|
+
return this.m68_1;
|
|
921
921
|
case 5:
|
|
922
|
-
throw this.
|
|
922
|
+
throw this.m9_1;
|
|
923
923
|
}
|
|
924
924
|
} catch ($p) {
|
|
925
925
|
var e = $p;
|
|
926
|
-
if (this.
|
|
926
|
+
if (this.k9_1 === 5) {
|
|
927
927
|
throw e;
|
|
928
928
|
} else {
|
|
929
|
-
this.
|
|
930
|
-
this.
|
|
929
|
+
this.j9_1 = this.k9_1;
|
|
930
|
+
this.m9_1 = e;
|
|
931
931
|
}
|
|
932
932
|
}
|
|
933
933
|
while (true);
|
|
934
934
|
};
|
|
935
935
|
function CardsDealerProviderImpl(random, randomPoolProvider, logger) {
|
|
936
|
-
this.
|
|
937
|
-
this.
|
|
938
|
-
this.
|
|
936
|
+
this.g69_1 = random;
|
|
937
|
+
this.h69_1 = randomPoolProvider;
|
|
938
|
+
this.i69_1 = logger;
|
|
939
939
|
}
|
|
940
|
-
protoOf(CardsDealerProviderImpl).
|
|
940
|
+
protoOf(CardsDealerProviderImpl).l67 = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit) {
|
|
941
941
|
// Inline function 'kotlin.collections.flatMap' call
|
|
942
942
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
943
943
|
var this_0 = get_entries();
|
|
@@ -947,7 +947,7 @@
|
|
|
947
947
|
var element = tmp0_iterator.l();
|
|
948
948
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.cards.CardsDealerProviderImpl.createNewCardDeck.<anonymous>' call
|
|
949
949
|
// Inline function 'kotlin.collections.map' call
|
|
950
|
-
var this_1 = this.
|
|
950
|
+
var this_1 = this.j69(leftCardIndexForEachSuit, rightCardIndexForEachSuit);
|
|
951
951
|
// Inline function 'kotlin.collections.mapTo' call
|
|
952
952
|
var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_1, 10));
|
|
953
953
|
var inductionVariable = this_1.a1_1;
|
|
@@ -958,7 +958,7 @@
|
|
|
958
958
|
inductionVariable = inductionVariable + 1 | 0;
|
|
959
959
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.cards.CardsDealerProviderImpl.createNewCardDeck.<anonymous>.<anonymous>' call
|
|
960
960
|
var it = item;
|
|
961
|
-
var tmp$ret$0 = Companion_instance.
|
|
961
|
+
var tmp$ret$0 = Companion_instance.w66(element, it);
|
|
962
962
|
destination_0.e(tmp$ret$0);
|
|
963
963
|
}
|
|
964
964
|
while (!(item === last));
|
|
@@ -967,10 +967,10 @@
|
|
|
967
967
|
}
|
|
968
968
|
return destination;
|
|
969
969
|
};
|
|
970
|
-
protoOf(CardsDealerProviderImpl).
|
|
970
|
+
protoOf(CardsDealerProviderImpl).j69 = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit) {
|
|
971
971
|
return until(leftCardIndexForEachSuit, 13 - rightCardIndexForEachSuit | 0);
|
|
972
972
|
};
|
|
973
|
-
protoOf(CardsDealerProviderImpl).
|
|
973
|
+
protoOf(CardsDealerProviderImpl).s67 = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit) {
|
|
974
974
|
// Inline function 'kotlin.collections.sumOf' call
|
|
975
975
|
var sum = 0;
|
|
976
976
|
var tmp0_iterator = get_entries().j();
|
|
@@ -978,17 +978,17 @@
|
|
|
978
978
|
var element = tmp0_iterator.l();
|
|
979
979
|
var tmp = sum;
|
|
980
980
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.cards.CardsDealerProviderImpl.getCardsCount.<anonymous>' call
|
|
981
|
-
sum = tmp + count(this.
|
|
981
|
+
sum = tmp + count(this.j69(leftCardIndexForEachSuit, rightCardIndexForEachSuit)) | 0;
|
|
982
982
|
}
|
|
983
983
|
return sum;
|
|
984
984
|
};
|
|
985
|
-
protoOf(CardsDealerProviderImpl).
|
|
985
|
+
protoOf(CardsDealerProviderImpl).m67 = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundCountForGame, userData, provider, $completion) {
|
|
986
986
|
var tmp = new $createNewShuffledCardDeckCOROUTINE$0(this, leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundCountForGame, userData, provider, $completion);
|
|
987
|
-
tmp.
|
|
988
|
-
tmp.
|
|
989
|
-
return tmp.
|
|
987
|
+
tmp.l9_1 = Unit_instance;
|
|
988
|
+
tmp.m9_1 = null;
|
|
989
|
+
return tmp.r9();
|
|
990
990
|
};
|
|
991
|
-
protoOf(CardsDealerProviderImpl).
|
|
991
|
+
protoOf(CardsDealerProviderImpl).n67 = function (count, cards) {
|
|
992
992
|
// Inline function 'kotlin.apply' call
|
|
993
993
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
994
994
|
var this_0 = ArrayList_init_$Create$();
|
|
@@ -1001,7 +1001,7 @@
|
|
|
1001
1001
|
if (this_0.m() === count) {
|
|
1002
1002
|
break $l$block;
|
|
1003
1003
|
}
|
|
1004
|
-
var hasSimilarCard = this_0.
|
|
1004
|
+
var hasSimilarCard = this_0.v1(card);
|
|
1005
1005
|
if (hasSimilarCard) {
|
|
1006
1006
|
continue $l$loop_0;
|
|
1007
1007
|
}
|
|
@@ -1022,7 +1022,7 @@
|
|
|
1022
1022
|
while (tmp0_iterator.k()) {
|
|
1023
1023
|
var element = tmp0_iterator.l();
|
|
1024
1024
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.cards.CardsDealerProviderImpl.getNRandomUniqueCards.<anonymous>.<anonymous>' call
|
|
1025
|
-
if (element.
|
|
1025
|
+
if (element.v66() === card.v66()) {
|
|
1026
1026
|
tmp$ret$2 = true;
|
|
1027
1027
|
break $l$block_1;
|
|
1028
1028
|
}
|
|
@@ -1037,7 +1037,7 @@
|
|
|
1037
1037
|
}
|
|
1038
1038
|
return this_0;
|
|
1039
1039
|
};
|
|
1040
|
-
protoOf(CardsDealerProviderImpl).
|
|
1040
|
+
protoOf(CardsDealerProviderImpl).o67 = function (cards, times) {
|
|
1041
1041
|
// Inline function 'kotlin.let' call
|
|
1042
1042
|
// Inline function 'kotlin.contracts.contract' call
|
|
1043
1043
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.cards.CardsDealerProviderImpl.standardShuffledCards.<anonymous>' call
|
|
@@ -1047,65 +1047,65 @@
|
|
|
1047
1047
|
do {
|
|
1048
1048
|
var i = inductionVariable;
|
|
1049
1049
|
inductionVariable = inductionVariable + 1 | 0;
|
|
1050
|
-
shuffled = this.
|
|
1050
|
+
shuffled = this.g69_1.r5w(shuffled);
|
|
1051
1051
|
}
|
|
1052
1052
|
while (inductionVariable < times);
|
|
1053
1053
|
return shuffled;
|
|
1054
1054
|
};
|
|
1055
|
-
protoOf(CardsDealerProviderImpl).
|
|
1056
|
-
return toList(overhand(riffle(toMutableList(cards), times, this.
|
|
1055
|
+
protoOf(CardsDealerProviderImpl).q67 = function (cards, times) {
|
|
1056
|
+
return toList(overhand(riffle(toMutableList(cards), times, this.g69_1), times, this.g69_1));
|
|
1057
1057
|
};
|
|
1058
1058
|
function Companion_3() {
|
|
1059
1059
|
}
|
|
1060
|
-
protoOf(Companion_3).
|
|
1060
|
+
protoOf(Companion_3).k69 = function () {
|
|
1061
1061
|
// Inline function 'kotlin.apply' call
|
|
1062
1062
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
1063
1063
|
var this_0 = ArrayList_init_$Create$();
|
|
1064
1064
|
// Inline function 'kotlin.contracts.contract' call
|
|
1065
1065
|
// 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.
|
|
1066
|
+
this_0.n(listOf([Companion_instance.x66(Suit_DIAMOND_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.x66(Suit_CLUB_getInstance(), CardName_NINE_getInstance()), Companion_instance.x66(Suit_CLUB_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.x66(Suit_CLUB_getInstance(), CardName_TEN_getInstance()), Companion_instance.x66(Suit_HEART_getInstance(), CardName_JACK_getInstance()), Companion_instance.x66(Suit_HEART_getInstance(), CardName_KING_getInstance())]));
|
|
1067
|
+
this_0.n(listOf([Companion_instance.x66(Suit_CLUB_getInstance(), CardName_JACK_getInstance()), Companion_instance.x66(Suit_SPADE_getInstance(), CardName_ACE_getInstance()), Companion_instance.x66(Suit_DIAMOND_getInstance(), CardName_NINE_getInstance()), Companion_instance.x66(Suit_DIAMOND_getInstance(), CardName_TEN_getInstance()), Companion_instance.x66(Suit_DIAMOND_getInstance(), CardName_JACK_getInstance()), Companion_instance.x66(Suit_HEART_getInstance(), CardName_EIGHT_getInstance())]));
|
|
1068
|
+
this_0.n(listOf([Companion_instance.x66(Suit_CLUB_getInstance(), CardName_QUEEN_getInstance()), Companion_instance.x66(Suit_HEART_getInstance(), CardName_ACE_getInstance()), Companion_instance.x66(Suit_HEART_getInstance(), CardName_QUEEN_getInstance()), Companion_instance.x66(Suit_HEART_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.x66(Suit_SPADE_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.x66(Suit_CLUB_getInstance(), CardName_KING_getInstance())]));
|
|
1069
|
+
this_0.n(listOf([Companion_instance.x66(Suit_SPADE_getInstance(), CardName_EIGHT_getInstance()), Companion_instance.x66(Suit_SPADE_getInstance(), CardName_TEN_getInstance()), Companion_instance.x66(Suit_HEART_getInstance(), CardName_TEN_getInstance()), Companion_instance.x66(Suit_SPADE_getInstance(), CardName_JACK_getInstance()), Companion_instance.x66(Suit_DIAMOND_getInstance(), CardName_EIGHT_getInstance()), Companion_instance.x66(Suit_SPADE_getInstance(), CardName_QUEEN_getInstance())]));
|
|
1070
|
+
this_0.n(listOf([Companion_instance.x66(Suit_DIAMOND_getInstance(), CardName_ACE_getInstance()), Companion_instance.x66(Suit_CLUB_getInstance(), CardName_EIGHT_getInstance()), Companion_instance.x66(Suit_DIAMOND_getInstance(), CardName_KING_getInstance()), Companion_instance.x66(Suit_SPADE_getInstance(), CardName_NINE_getInstance()), Companion_instance.x66(Suit_CLUB_getInstance(), CardName_ACE_getInstance()), Companion_instance.x66(Suit_SPADE_getInstance(), CardName_KING_getInstance()), Companion_instance.x66(Suit_DIAMOND_getInstance(), CardName_QUEEN_getInstance()), Companion_instance.x66(Suit_HEART_getInstance(), CardName_NINE_getInstance())]));
|
|
1071
1071
|
return this_0;
|
|
1072
1072
|
};
|
|
1073
|
-
protoOf(Companion_3).
|
|
1074
|
-
return listOf([Companion_instance.
|
|
1073
|
+
protoOf(Companion_3).l69 = function () {
|
|
1074
|
+
return listOf([Companion_instance.x66(Suit_CLUB_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.x66(Suit_HEART_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.x66(Suit_SPADE_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.x66(Suit_SPADE_getInstance(), CardName_EIGHT_getInstance())]);
|
|
1075
1075
|
};
|
|
1076
1076
|
var Companion_instance_3;
|
|
1077
1077
|
function Companion_getInstance_3() {
|
|
1078
1078
|
return Companion_instance_3;
|
|
1079
1079
|
}
|
|
1080
1080
|
function FakeCardsDealerProvider(cards, cardsForLot) {
|
|
1081
|
-
cards = cards === VOID ? Companion_instance_3.
|
|
1082
|
-
cardsForLot = cardsForLot === VOID ? Companion_instance_3.
|
|
1083
|
-
this.
|
|
1084
|
-
this.
|
|
1081
|
+
cards = cards === VOID ? Companion_instance_3.k69() : cards;
|
|
1082
|
+
cardsForLot = cardsForLot === VOID ? Companion_instance_3.l69() : cardsForLot;
|
|
1083
|
+
this.m69_1 = cards;
|
|
1084
|
+
this.n69_1 = cardsForLot;
|
|
1085
1085
|
}
|
|
1086
|
-
protoOf(FakeCardsDealerProvider).
|
|
1087
|
-
return this.
|
|
1086
|
+
protoOf(FakeCardsDealerProvider).l67 = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit) {
|
|
1087
|
+
return this.m69_1;
|
|
1088
1088
|
};
|
|
1089
|
-
protoOf(FakeCardsDealerProvider).
|
|
1090
|
-
return this.
|
|
1089
|
+
protoOf(FakeCardsDealerProvider).m67 = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundCountForGame, userData, provider, $completion) {
|
|
1090
|
+
return this.m69_1;
|
|
1091
1091
|
};
|
|
1092
|
-
protoOf(FakeCardsDealerProvider).
|
|
1093
|
-
return this.
|
|
1092
|
+
protoOf(FakeCardsDealerProvider).n67 = function (count, cards) {
|
|
1093
|
+
return this.n69_1;
|
|
1094
1094
|
};
|
|
1095
|
-
protoOf(FakeCardsDealerProvider).
|
|
1095
|
+
protoOf(FakeCardsDealerProvider).o67 = function (cards, times) {
|
|
1096
1096
|
return cards;
|
|
1097
1097
|
};
|
|
1098
|
-
protoOf(FakeCardsDealerProvider).
|
|
1098
|
+
protoOf(FakeCardsDealerProvider).q67 = function (cards, times) {
|
|
1099
1099
|
return cards;
|
|
1100
1100
|
};
|
|
1101
|
-
protoOf(FakeCardsDealerProvider).
|
|
1102
|
-
return this.
|
|
1101
|
+
protoOf(FakeCardsDealerProvider).s67 = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit) {
|
|
1102
|
+
return this.m69_1.m();
|
|
1103
1103
|
};
|
|
1104
1104
|
function CombinationsCheckerProvider() {
|
|
1105
1105
|
}
|
|
1106
1106
|
function createCombination($this, cards, supportedCombinations) {
|
|
1107
1107
|
var size = cards.m();
|
|
1108
|
-
if (supportedCombinations.
|
|
1108
|
+
if (supportedCombinations.v1(size)) {
|
|
1109
1109
|
return cards;
|
|
1110
1110
|
}
|
|
1111
1111
|
var fromLongestCombinations = asReversed(sorted(supportedCombinations));
|
|
@@ -1127,23 +1127,23 @@
|
|
|
1127
1127
|
return takeLast(cards, longestCombinationSupport);
|
|
1128
1128
|
}
|
|
1129
1129
|
function sam$kotlin_Comparator$0(function_0) {
|
|
1130
|
-
this.
|
|
1130
|
+
this.t69_1 = function_0;
|
|
1131
1131
|
}
|
|
1132
|
-
protoOf(sam$kotlin_Comparator$0).
|
|
1133
|
-
return this.
|
|
1132
|
+
protoOf(sam$kotlin_Comparator$0).rc = function (a, b) {
|
|
1133
|
+
return this.t69_1(a, b);
|
|
1134
1134
|
};
|
|
1135
1135
|
protoOf(sam$kotlin_Comparator$0).compare = function (a, b) {
|
|
1136
|
-
return this.
|
|
1136
|
+
return this.rc(a, b);
|
|
1137
1137
|
};
|
|
1138
|
-
protoOf(sam$kotlin_Comparator$0).
|
|
1139
|
-
return this.
|
|
1138
|
+
protoOf(sam$kotlin_Comparator$0).t3 = function () {
|
|
1139
|
+
return this.t69_1;
|
|
1140
1140
|
};
|
|
1141
1141
|
protoOf(sam$kotlin_Comparator$0).equals = function (other) {
|
|
1142
1142
|
var tmp;
|
|
1143
1143
|
if (!(other == null) ? isInterface(other, Comparator) : false) {
|
|
1144
1144
|
var tmp_0;
|
|
1145
1145
|
if (!(other == null) ? isInterface(other, FunctionAdapter) : false) {
|
|
1146
|
-
tmp_0 = equals(this.
|
|
1146
|
+
tmp_0 = equals(this.t3(), other.t3());
|
|
1147
1147
|
} else {
|
|
1148
1148
|
tmp_0 = false;
|
|
1149
1149
|
}
|
|
@@ -1154,19 +1154,19 @@
|
|
|
1154
1154
|
return tmp;
|
|
1155
1155
|
};
|
|
1156
1156
|
protoOf(sam$kotlin_Comparator$0).hashCode = function () {
|
|
1157
|
-
return hashCode(this.
|
|
1157
|
+
return hashCode(this.t3());
|
|
1158
1158
|
};
|
|
1159
1159
|
function CombinationsCheckerProviderImpl$createCombinationsFromCardsInRow$lambda(a, b) {
|
|
1160
1160
|
// Inline function 'kotlin.comparisons.compareValuesBy' call
|
|
1161
1161
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.combinations.CombinationsCheckerProviderImpl.createCombinationsFromCardsInRow.<anonymous>' call
|
|
1162
|
-
var tmp = first_0(a).
|
|
1162
|
+
var tmp = first_0(a).u66_1;
|
|
1163
1163
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.combinations.CombinationsCheckerProviderImpl.createCombinationsFromCardsInRow.<anonymous>' call
|
|
1164
|
-
var tmp$ret$1 = first_0(b).
|
|
1164
|
+
var tmp$ret$1 = first_0(b).u66_1;
|
|
1165
1165
|
return compareValues(tmp, tmp$ret$1);
|
|
1166
1166
|
}
|
|
1167
1167
|
function CombinationsCheckerProviderImpl() {
|
|
1168
1168
|
}
|
|
1169
|
-
protoOf(CombinationsCheckerProviderImpl).
|
|
1169
|
+
protoOf(CombinationsCheckerProviderImpl).o69 = function (cards, supportedCombinations, checkFromIndex, includeCardNames, suit) {
|
|
1170
1170
|
// Inline function 'kotlin.collections.filter' call
|
|
1171
1171
|
// Inline function 'kotlin.apply' call
|
|
1172
1172
|
var this_0 = toMutableList(cards);
|
|
@@ -1179,7 +1179,7 @@
|
|
|
1179
1179
|
while (tmp0_iterator.k()) {
|
|
1180
1180
|
var element = tmp0_iterator.l();
|
|
1181
1181
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.combinations.CombinationsCheckerProviderImpl.findCardsInRowCombinations.<anonymous>' call
|
|
1182
|
-
if (element.
|
|
1182
|
+
if (element.j67()) {
|
|
1183
1183
|
destination.e(element);
|
|
1184
1184
|
}
|
|
1185
1185
|
}
|
|
@@ -1196,16 +1196,16 @@
|
|
|
1196
1196
|
inductionVariable = inductionVariable + 1 | 0;
|
|
1197
1197
|
var previousCard = lastOrNull(combinationCards);
|
|
1198
1198
|
var currentCard = sortedByIndexCards.o(i);
|
|
1199
|
-
var isNextInRow = !(previousCard == null) && currentCard.
|
|
1200
|
-
var passedCardNamesCheck = includeCardNames == null || includeCardNames.
|
|
1201
|
-
var passedSuitCheck = suit == null || currentCard.
|
|
1199
|
+
var isNextInRow = !(previousCard == null) && currentCard.u66_1 === (previousCard.u66_1 + 1 | 0) && currentCard.i67().equals(previousCard.i67());
|
|
1200
|
+
var passedCardNamesCheck = includeCardNames == null || includeCardNames.v1(currentCard.s2());
|
|
1201
|
+
var passedSuitCheck = suit == null || currentCard.i67().equals(suit);
|
|
1202
1202
|
if (isNextInRow && passedSuitCheck && passedCardNamesCheck) {
|
|
1203
1203
|
combinationCards.e(currentCard);
|
|
1204
1204
|
} else {
|
|
1205
1205
|
if (combinationCards.m() > (checkFromIndex - 1 | 0)) {
|
|
1206
|
-
combinations.n(this.
|
|
1206
|
+
combinations.n(this.s69(toMutableList(combinationCards), supportedCombinations));
|
|
1207
1207
|
}
|
|
1208
|
-
combinationCards.
|
|
1208
|
+
combinationCards.d2();
|
|
1209
1209
|
if (passedSuitCheck && passedCardNamesCheck) {
|
|
1210
1210
|
combinationCards.e(currentCard);
|
|
1211
1211
|
}
|
|
@@ -1213,11 +1213,11 @@
|
|
|
1213
1213
|
}
|
|
1214
1214
|
while (inductionVariable <= last);
|
|
1215
1215
|
if (combinationCards.m() > (checkFromIndex - 1 | 0)) {
|
|
1216
|
-
combinations.n(this.
|
|
1216
|
+
combinations.n(this.s69(toMutableList(combinationCards), supportedCombinations));
|
|
1217
1217
|
}
|
|
1218
1218
|
return combinations;
|
|
1219
1219
|
};
|
|
1220
|
-
protoOf(CombinationsCheckerProviderImpl).
|
|
1220
|
+
protoOf(CombinationsCheckerProviderImpl).q69 = function (cards, cardsCount, includeCardNames) {
|
|
1221
1221
|
// Inline function 'kotlin.collections.filter' call
|
|
1222
1222
|
// Inline function 'kotlin.collections.filter' call
|
|
1223
1223
|
// Inline function 'kotlin.apply' call
|
|
@@ -1231,7 +1231,7 @@
|
|
|
1231
1231
|
while (tmp0_iterator.k()) {
|
|
1232
1232
|
var element = tmp0_iterator.l();
|
|
1233
1233
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.combinations.CombinationsCheckerProviderImpl.findSameCardsNumberCombinations.<anonymous>' call
|
|
1234
|
-
if (element.
|
|
1234
|
+
if (element.j67()) {
|
|
1235
1235
|
destination.e(element);
|
|
1236
1236
|
}
|
|
1237
1237
|
}
|
|
@@ -1241,7 +1241,7 @@
|
|
|
1241
1241
|
while (tmp0_iterator_0.k()) {
|
|
1242
1242
|
var element_0 = tmp0_iterator_0.l();
|
|
1243
1243
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.combinations.CombinationsCheckerProviderImpl.findSameCardsNumberCombinations.<anonymous>' call
|
|
1244
|
-
if (includeCardNames == null || includeCardNames.
|
|
1244
|
+
if (includeCardNames == null || includeCardNames.v1(element_0.s2())) {
|
|
1245
1245
|
destination_0.e(element_0);
|
|
1246
1246
|
}
|
|
1247
1247
|
}
|
|
@@ -1254,14 +1254,14 @@
|
|
|
1254
1254
|
while (tmp0_iterator_1.k()) {
|
|
1255
1255
|
var element_1 = tmp0_iterator_1.l();
|
|
1256
1256
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.combinations.CombinationsCheckerProviderImpl.findSameCardsNumberCombinations.<anonymous>' call
|
|
1257
|
-
var key = element_1.
|
|
1257
|
+
var key = element_1.v66();
|
|
1258
1258
|
// Inline function 'kotlin.collections.getOrPut' call
|
|
1259
|
-
var value = destination_1.
|
|
1259
|
+
var value = destination_1.k2(key);
|
|
1260
1260
|
var tmp;
|
|
1261
1261
|
if (value == null) {
|
|
1262
1262
|
// Inline function 'kotlin.collections.groupByTo.<anonymous>' call
|
|
1263
1263
|
var answer = ArrayList_init_$Create$();
|
|
1264
|
-
destination_1.
|
|
1264
|
+
destination_1.n2(key, answer);
|
|
1265
1265
|
tmp = answer;
|
|
1266
1266
|
} else {
|
|
1267
1267
|
tmp = value;
|
|
@@ -1277,10 +1277,10 @@
|
|
|
1277
1277
|
var element_2 = tmp0_iterator_2.l();
|
|
1278
1278
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.combinations.CombinationsCheckerProviderImpl.findSameCardsNumberCombinations.<anonymous>' call
|
|
1279
1279
|
if (element_2.u().m() >= cardsCount) {
|
|
1280
|
-
destination_2.
|
|
1280
|
+
destination_2.n2(element_2.t(), element_2.u());
|
|
1281
1281
|
}
|
|
1282
1282
|
}
|
|
1283
|
-
var combinations = destination_2.
|
|
1283
|
+
var combinations = destination_2.m2();
|
|
1284
1284
|
// Inline function 'kotlin.collections.map' call
|
|
1285
1285
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1286
1286
|
var destination_3 = ArrayList_init_$Create$_0(collectionSizeOrDefault(combinations, 10));
|
|
@@ -1293,7 +1293,7 @@
|
|
|
1293
1293
|
}
|
|
1294
1294
|
return destination_3;
|
|
1295
1295
|
};
|
|
1296
|
-
protoOf(CombinationsCheckerProviderImpl).
|
|
1296
|
+
protoOf(CombinationsCheckerProviderImpl).s69 = function (cards, supportedCombinations) {
|
|
1297
1297
|
// Inline function 'kotlin.collections.minOf' call
|
|
1298
1298
|
var iterator = supportedCombinations.j();
|
|
1299
1299
|
if (!iterator.k())
|
|
@@ -1314,7 +1314,7 @@
|
|
|
1314
1314
|
while (cardsToCheck.m() >= shortestCombinationSupport) {
|
|
1315
1315
|
var combinationCards = createCombination(this, cardsToCheck, supportedCombinations);
|
|
1316
1316
|
combinations.e(toList(combinationCards));
|
|
1317
|
-
cardsToCheck.
|
|
1317
|
+
cardsToCheck.c2(combinationCards);
|
|
1318
1318
|
}
|
|
1319
1319
|
// Inline function 'kotlin.collections.sortedBy' call
|
|
1320
1320
|
// Inline function 'kotlin.comparisons.compareBy' call
|
|
@@ -1323,28 +1323,28 @@
|
|
|
1323
1323
|
return sortedWith(combinations, tmp$ret$4);
|
|
1324
1324
|
};
|
|
1325
1325
|
function DealerReducerImpl(logger, enableLogs) {
|
|
1326
|
-
this.
|
|
1327
|
-
this.
|
|
1326
|
+
this.u69_1 = logger;
|
|
1327
|
+
this.v69_1 = enableLogs;
|
|
1328
1328
|
}
|
|
1329
|
-
protoOf(DealerReducerImpl).
|
|
1329
|
+
protoOf(DealerReducerImpl).w69 = function (cards, cardsToRemove) {
|
|
1330
1330
|
var list = cards;
|
|
1331
1331
|
var _iterator__ex2g4s = cardsToRemove.j();
|
|
1332
1332
|
while (_iterator__ex2g4s.k()) {
|
|
1333
1333
|
var gameCard = _iterator__ex2g4s.l();
|
|
1334
|
-
list = this.
|
|
1334
|
+
list = this.x69(list, gameCard);
|
|
1335
1335
|
}
|
|
1336
1336
|
return list;
|
|
1337
1337
|
};
|
|
1338
|
-
protoOf(DealerReducerImpl).
|
|
1338
|
+
protoOf(DealerReducerImpl).x69 = function (cards, cardToRemove) {
|
|
1339
1339
|
var tmp;
|
|
1340
|
-
if (!cardToRemove.
|
|
1341
|
-
if (this.
|
|
1342
|
-
this.
|
|
1340
|
+
if (!cardToRemove.a67() && cards.v1(cardToRemove)) {
|
|
1341
|
+
if (this.v69_1) {
|
|
1342
|
+
this.u69_1.d('Dealer', 'Card removed: ' + cardToRemove.toString() + ', size: ' + (cards.m() - 1 | 0));
|
|
1343
1343
|
}
|
|
1344
1344
|
tmp = minus(cards, cardToRemove);
|
|
1345
1345
|
} else {
|
|
1346
|
-
if (this.
|
|
1347
|
-
this.
|
|
1346
|
+
if (this.v69_1) {
|
|
1347
|
+
this.u69_1.d('Dealer', 'Card removed as hidden: ' + cardToRemove.toString() + ', size: ' + (cards.m() - 1 | 0));
|
|
1348
1348
|
}
|
|
1349
1349
|
// Inline function 'kotlin.collections.filterNot' call
|
|
1350
1350
|
// Inline function 'kotlin.collections.filterNotTo' call
|
|
@@ -1353,11 +1353,11 @@
|
|
|
1353
1353
|
while (tmp0_iterator.k()) {
|
|
1354
1354
|
var element = tmp0_iterator.l();
|
|
1355
1355
|
// Inline function 'io.raspberryapps.card_game.core.domain.dealer.DealerReducerImpl.removeCard.<anonymous>' call
|
|
1356
|
-
if (!element.
|
|
1356
|
+
if (!element.a67()) {
|
|
1357
1357
|
destination.e(element);
|
|
1358
1358
|
}
|
|
1359
1359
|
}
|
|
1360
|
-
var
|
|
1360
|
+
var notHiddenCards = destination;
|
|
1361
1361
|
// Inline function 'kotlin.collections.filter' call
|
|
1362
1362
|
// Inline function 'kotlin.collections.filterTo' call
|
|
1363
1363
|
var destination_0 = ArrayList_init_$Create$();
|
|
@@ -1365,36 +1365,36 @@
|
|
|
1365
1365
|
while (tmp0_iterator_0.k()) {
|
|
1366
1366
|
var element_0 = tmp0_iterator_0.l();
|
|
1367
1367
|
// Inline function 'io.raspberryapps.card_game.core.domain.dealer.DealerReducerImpl.removeCard.<anonymous>' call
|
|
1368
|
-
if (element_0.
|
|
1368
|
+
if (element_0.a67()) {
|
|
1369
1369
|
destination_0.e(element_0);
|
|
1370
1370
|
}
|
|
1371
1371
|
}
|
|
1372
|
-
var
|
|
1373
|
-
if (
|
|
1374
|
-
this.
|
|
1372
|
+
var hiddenCards = destination_0;
|
|
1373
|
+
if (hiddenCards.p()) {
|
|
1374
|
+
this.u69_1.w('Dealer', "Can't find card to delete for player, " + ('cards:' + toString(cards) + ', ') + ('cardToRemove: ' + cardToRemove.toString()));
|
|
1375
1375
|
}
|
|
1376
|
-
tmp = plus(
|
|
1376
|
+
tmp = plus(notHiddenCards, dropLast(hiddenCards, 1));
|
|
1377
1377
|
}
|
|
1378
1378
|
return tmp;
|
|
1379
1379
|
};
|
|
1380
|
-
protoOf(DealerReducerImpl).
|
|
1381
|
-
if (this.
|
|
1382
|
-
this.
|
|
1380
|
+
protoOf(DealerReducerImpl).y69 = function (cards, cardToAdd) {
|
|
1381
|
+
if (this.v69_1) {
|
|
1382
|
+
this.u69_1.d('Dealer', 'Card added: ' + cardToAdd.toString() + ', size: ' + (cards.m() + 1 | 0));
|
|
1383
1383
|
}
|
|
1384
|
-
if (cards.
|
|
1385
|
-
this.
|
|
1384
|
+
if (cards.v1(cardToAdd)) {
|
|
1385
|
+
this.u69_1.w('Dealer', 'Card already exists for player, ' + ('cards:' + toString(cards) + ', ') + ('cardToAdd: ' + cardToAdd.toString()));
|
|
1386
1386
|
}
|
|
1387
1387
|
return plus_0(cards, cardToAdd);
|
|
1388
1388
|
};
|
|
1389
1389
|
function DealerReducer() {
|
|
1390
1390
|
}
|
|
1391
1391
|
//region block: post-declaration
|
|
1392
|
-
protoOf(CardsDealerProviderImpl).
|
|
1393
|
-
protoOf(CardsDealerProviderImpl).
|
|
1394
|
-
protoOf(FakeCardsDealerProvider).
|
|
1395
|
-
protoOf(FakeCardsDealerProvider).
|
|
1396
|
-
protoOf(CombinationsCheckerProviderImpl).
|
|
1397
|
-
protoOf(CombinationsCheckerProviderImpl).
|
|
1392
|
+
protoOf(CardsDealerProviderImpl).p67 = standardShuffledCards$default;
|
|
1393
|
+
protoOf(CardsDealerProviderImpl).r67 = realLifeShuffledCards$default;
|
|
1394
|
+
protoOf(FakeCardsDealerProvider).p67 = standardShuffledCards$default;
|
|
1395
|
+
protoOf(FakeCardsDealerProvider).r67 = realLifeShuffledCards$default;
|
|
1396
|
+
protoOf(CombinationsCheckerProviderImpl).p69 = findCardsInRowCombinations$default;
|
|
1397
|
+
protoOf(CombinationsCheckerProviderImpl).r69 = findSameCardsNumberCombinations$default;
|
|
1398
1398
|
//endregion
|
|
1399
1399
|
//region block: init
|
|
1400
1400
|
CoreConfig_instance = new CoreConfig();
|
|
@@ -1417,11 +1417,11 @@
|
|
|
1417
1417
|
_.$jsExportAll$ = $jsExportAll$;
|
|
1418
1418
|
_.$_$ = _.$_$ || {};
|
|
1419
1419
|
_.$_$.a = CardName_ACE_getInstance;
|
|
1420
|
-
_.$_$.b =
|
|
1421
|
-
_.$_$.c =
|
|
1422
|
-
_.$_$.d =
|
|
1423
|
-
_.$_$.e =
|
|
1424
|
-
_.$_$.f =
|
|
1420
|
+
_.$_$.b = CardName_EIGHT_getInstance;
|
|
1421
|
+
_.$_$.c = CardName_JACK_getInstance;
|
|
1422
|
+
_.$_$.d = CardName_KING_getInstance;
|
|
1423
|
+
_.$_$.e = CardName_NINE_getInstance;
|
|
1424
|
+
_.$_$.f = CardName_QUEEN_getInstance;
|
|
1425
1425
|
_.$_$.g = CardName_SEVEN_getInstance;
|
|
1426
1426
|
_.$_$.h = CardName_TEN_getInstance;
|
|
1427
1427
|
_.$_$.i = CardsRandomProvider_CUSTOM_getInstance;
|