game_client_logic_deb 1.8.208 → 1.8.232
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 +77 -77
- package/Kosi-Kaverit-kaverit.js.map +1 -1
- package/Kosi-Kodein-kodein-di.js +610 -610
- package/Kosi-Kodein-kodein-di.js.map +1 -1
- package/Kotlin-DateTime-library-kotlinx-datetime.js +1572 -1517
- package/Kotlin-DateTime-library-kotlinx-datetime.js.map +1 -1
- package/Logic_Debertz-core.js +1651 -1482
- package/Logic_Debertz-core.js.map +1 -1
- package/Logic_Debertz-engine.js +14383 -13705
- package/Logic_Debertz-engine.js.map +1 -1
- package/Logic_Debertz-game_client.d.ts +56 -16
- package/Logic_Debertz-game_client.js +5642 -4795
- package/Logic_Debertz-game_client.js.map +1 -1
- package/kotlin-kotlin-stdlib.js +3205 -2380
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kotlin-kotlinx-atomicfu-runtime.js +3 -3
- package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js +3 -3
- package/kotlinx-atomicfu.js +66 -66
- package/kotlinx-atomicfu.js.map +1 -1
- package/kotlinx-coroutines-core.js +3830 -3787
- package/kotlinx-coroutines-core.js.map +1 -1
- package/kotlinx-io-kotlinx-io-bytestring.js +3 -3
- package/kotlinx-io-kotlinx-io-core.js +277 -277
- package/kotlinx-io-kotlinx-io-core.js.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-core.js +2296 -2209
- package/kotlinx-serialization-kotlinx-serialization-core.js.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-json.js +2069 -1725
- package/kotlinx-serialization-kotlinx-serialization-json.js.map +1 -1
- package/ktor-ktor-client-content-negotiation.js +220 -220
- package/ktor-ktor-client-core.js +2532 -2504
- package/ktor-ktor-client-core.js.map +1 -1
- package/ktor-ktor-client-js.js +3 -3
- package/ktor-ktor-client-logging.js +573 -549
- package/ktor-ktor-client-logging.js.map +1 -1
- package/ktor-ktor-events.js +16 -16
- package/ktor-ktor-http.js +748 -726
- package/ktor-ktor-http.js.map +1 -1
- package/ktor-ktor-io.js +1637 -1640
- package/ktor-ktor-io.js.map +1 -1
- package/ktor-ktor-serialization-kotlinx-json.js +14 -14
- package/ktor-ktor-serialization-kotlinx.js +314 -269
- package/ktor-ktor-serialization-kotlinx.js.map +1 -1
- package/ktor-ktor-serialization.js +153 -128
- package/ktor-ktor-serialization.js.map +1 -1
- package/ktor-ktor-utils.js +702 -702
- package/ktor-ktor-utils.js.map +1 -1
- package/ktor-ktor-websocket-serialization.js +3 -3
- package/ktor-ktor-websockets.js +61 -61
- package/ktor-ktor-websockets.js.map +1 -1
- package/package.json +1 -1
- package/raspberry-cardgame-lib-core.js +263 -234
- package/raspberry-cardgame-lib-core.js.map +1 -1
- package/raspberry-cardgame-lib-logger.js +104 -104
- package/raspberry-cardgame-lib-random.js +1000 -1006
- package/raspberry-cardgame-lib-random.js.map +1 -1
- package/secure-random-secure-random.js +21 -21
- package/secure-random-secure-random.js.map +1 -1
- package/uuid.js +30 -30
- package/uuid.js.map +1 -1
|
@@ -1,68 +1,71 @@
|
|
|
1
|
-
(function (
|
|
1
|
+
(function (factory) {
|
|
2
2
|
if (typeof define === 'function' && define.amd)
|
|
3
3
|
define(['exports', './kotlin-kotlin-stdlib.js', './kotlinx-serialization-kotlinx-serialization-core.js', './raspberry-cardgame-lib-random.js'], factory);
|
|
4
4
|
else if (typeof exports === 'object')
|
|
5
5
|
factory(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./kotlinx-serialization-kotlinx-serialization-core.js'), require('./raspberry-cardgame-lib-random.js'));
|
|
6
6
|
else {
|
|
7
|
-
if (typeof
|
|
7
|
+
if (typeof globalThis['kotlin-kotlin-stdlib'] === 'undefined') {
|
|
8
8
|
throw new Error("Error loading module 'raspberry-cardgame-lib-core'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to 'raspberry-cardgame-lib-core'.");
|
|
9
9
|
}
|
|
10
|
-
if (typeof
|
|
10
|
+
if (typeof globalThis['kotlinx-serialization-kotlinx-serialization-core'] === 'undefined') {
|
|
11
11
|
throw new Error("Error loading module 'raspberry-cardgame-lib-core'. Its dependency 'kotlinx-serialization-kotlinx-serialization-core' was not found. Please, check whether 'kotlinx-serialization-kotlinx-serialization-core' is loaded prior to 'raspberry-cardgame-lib-core'.");
|
|
12
12
|
}
|
|
13
|
-
if (typeof
|
|
13
|
+
if (typeof globalThis['raspberry-cardgame-lib-random'] === 'undefined') {
|
|
14
14
|
throw new Error("Error loading module 'raspberry-cardgame-lib-core'. Its dependency 'raspberry-cardgame-lib-random' was not found. Please, check whether 'raspberry-cardgame-lib-random' is loaded prior to 'raspberry-cardgame-lib-core'.");
|
|
15
15
|
}
|
|
16
|
-
|
|
16
|
+
globalThis['raspberry-cardgame-lib-core'] = factory(typeof globalThis['raspberry-cardgame-lib-core'] === 'undefined' ? {} : globalThis['raspberry-cardgame-lib-core'], globalThis['kotlin-kotlin-stdlib'], globalThis['kotlinx-serialization-kotlinx-serialization-core'], globalThis['raspberry-cardgame-lib-random']);
|
|
17
17
|
}
|
|
18
|
-
}(
|
|
18
|
+
}(function (_, kotlin_kotlin, kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core, kotlin_io_raspberryapps_cardgame_random) {
|
|
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.$_$.sc;
|
|
23
|
+
var initMetadataForObject = kotlin_kotlin.$_$.wb;
|
|
24
|
+
var defineProp = kotlin_kotlin.$_$.ib;
|
|
25
|
+
var THROW_CCE = kotlin_kotlin.$_$.tg;
|
|
26
|
+
var Comparator = kotlin_kotlin.$_$.fg;
|
|
27
27
|
var VOID = kotlin_kotlin.$_$.f;
|
|
28
28
|
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.n;
|
|
29
29
|
var Unit_instance = kotlin_kotlin.$_$.n5;
|
|
30
30
|
var take = kotlin_kotlin.$_$.m9;
|
|
31
31
|
var toList = kotlin_kotlin.$_$.q9;
|
|
32
32
|
var takeLast = kotlin_kotlin.$_$.l9;
|
|
33
|
-
var noWhenBranchMatchedException = kotlin_kotlin.$_$.
|
|
34
|
-
var initMetadataForCompanion = kotlin_kotlin.$_$.
|
|
33
|
+
var noWhenBranchMatchedException = kotlin_kotlin.$_$.rh;
|
|
34
|
+
var initMetadataForCompanion = kotlin_kotlin.$_$.sb;
|
|
35
35
|
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.v1;
|
|
36
|
-
var Enum = kotlin_kotlin.$_$.
|
|
37
|
-
var initMetadataForClass = kotlin_kotlin.$_$.
|
|
38
|
-
var createSimpleEnumSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.
|
|
39
|
-
var enumEntries = kotlin_kotlin.$_$.
|
|
36
|
+
var Enum = kotlin_kotlin.$_$.ig;
|
|
37
|
+
var initMetadataForClass = kotlin_kotlin.$_$.rb;
|
|
38
|
+
var createSimpleEnumSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.e2;
|
|
39
|
+
var enumEntries = kotlin_kotlin.$_$.va;
|
|
40
40
|
var LazyThreadSafetyMode_PUBLICATION_getInstance = kotlin_kotlin.$_$.k;
|
|
41
|
-
var lazy = kotlin_kotlin.$_$.
|
|
42
|
-
var SerializerFactory = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.
|
|
43
|
-
var initMetadataForInterface = kotlin_kotlin.$_$.
|
|
44
|
-
var until = kotlin_kotlin.$_$.
|
|
41
|
+
var lazy = kotlin_kotlin.$_$.ph;
|
|
42
|
+
var SerializerFactory = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.c2;
|
|
43
|
+
var initMetadataForInterface = kotlin_kotlin.$_$.ub;
|
|
44
|
+
var until = kotlin_kotlin.$_$.id;
|
|
45
45
|
var collectionSizeOrDefault = kotlin_kotlin.$_$.q6;
|
|
46
46
|
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.m;
|
|
47
47
|
var SecureRandom = kotlin_io_raspberryapps_cardgame_random.$_$.j;
|
|
48
|
-
var CoroutineImpl = kotlin_kotlin.$_$.
|
|
48
|
+
var CoroutineImpl = kotlin_kotlin.$_$.ta;
|
|
49
49
|
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.ea;
|
|
50
|
-
var initMetadataForCoroutine = kotlin_kotlin.$_$.
|
|
50
|
+
var initMetadataForCoroutine = kotlin_kotlin.$_$.tb;
|
|
51
51
|
var count = kotlin_kotlin.$_$.h7;
|
|
52
|
-
var Result = kotlin_kotlin.$_$.
|
|
53
|
-
var Result__exceptionOrNull_impl_p6xea9 = kotlin_kotlin.$_$.
|
|
54
|
-
var throwOnFailure = kotlin_kotlin.$_$.
|
|
55
|
-
var _Result___get_value__impl__bjfvqg = kotlin_kotlin.$_$.
|
|
56
|
-
var _Result___get_isSuccess__impl__sndoy8 = kotlin_kotlin.$_$.
|
|
52
|
+
var Result = kotlin_kotlin.$_$.rg;
|
|
53
|
+
var Result__exceptionOrNull_impl_p6xea9 = kotlin_kotlin.$_$.e3;
|
|
54
|
+
var throwOnFailure = kotlin_kotlin.$_$.vh;
|
|
55
|
+
var _Result___get_value__impl__bjfvqg = kotlin_kotlin.$_$.h3;
|
|
56
|
+
var _Result___get_isSuccess__impl__sndoy8 = kotlin_kotlin.$_$.g3;
|
|
57
57
|
var addAll = kotlin_kotlin.$_$.e6;
|
|
58
58
|
var Collection = kotlin_kotlin.$_$.p5;
|
|
59
|
-
var isInterface = kotlin_kotlin.$_$.
|
|
59
|
+
var isInterface = kotlin_kotlin.$_$.fc;
|
|
60
60
|
var toMutableList = kotlin_kotlin.$_$.u9;
|
|
61
61
|
var listOf = kotlin_kotlin.$_$.o8;
|
|
62
62
|
var first = kotlin_kotlin.$_$.t7;
|
|
63
63
|
var sorted = kotlin_kotlin.$_$.j9;
|
|
64
64
|
var asReversed = kotlin_kotlin.$_$.i6;
|
|
65
65
|
var NoSuchElementException_init_$Create$ = kotlin_kotlin.$_$.c2;
|
|
66
|
+
var equals = kotlin_kotlin.$_$.jb;
|
|
67
|
+
var FunctionAdapter = kotlin_kotlin.$_$.xa;
|
|
68
|
+
var hashCode = kotlin_kotlin.$_$.qb;
|
|
66
69
|
var first_0 = kotlin_kotlin.$_$.s7;
|
|
67
70
|
var compareValues = kotlin_kotlin.$_$.ca;
|
|
68
71
|
var sortWith = kotlin_kotlin.$_$.h9;
|
|
@@ -70,8 +73,8 @@
|
|
|
70
73
|
var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.w;
|
|
71
74
|
var sortedWith = kotlin_kotlin.$_$.i9;
|
|
72
75
|
var NoSuchElementException_init_$Create$_0 = kotlin_kotlin.$_$.a2;
|
|
73
|
-
var compareTo = kotlin_kotlin.$_$.
|
|
74
|
-
var toString = kotlin_kotlin.$_$.
|
|
76
|
+
var compareTo = kotlin_kotlin.$_$.hb;
|
|
77
|
+
var toString = kotlin_kotlin.$_$.wc;
|
|
75
78
|
var dropLast = kotlin_kotlin.$_$.j7;
|
|
76
79
|
var plus = kotlin_kotlin.$_$.x8;
|
|
77
80
|
var minus = kotlin_kotlin.$_$.s8;
|
|
@@ -90,7 +93,7 @@
|
|
|
90
93
|
initMetadataForClass(CardsRandomProvider, 'CardsRandomProvider', VOID, Enum);
|
|
91
94
|
function standardShuffledCards$default(cards, times, $super) {
|
|
92
95
|
times = times === VOID ? 3 : times;
|
|
93
|
-
return $super === VOID ? this.
|
|
96
|
+
return $super === VOID ? this.g65(cards, times) : $super.g65.call(this, cards, times);
|
|
94
97
|
}
|
|
95
98
|
initMetadataForInterface(CardsDealerProvider, 'CardsDealerProvider', VOID, VOID, VOID, [5]);
|
|
96
99
|
initMetadataForCompanion(Companion_2);
|
|
@@ -103,23 +106,23 @@
|
|
|
103
106
|
checkFromIndex = checkFromIndex === VOID ? first(supportedCombinations) : checkFromIndex;
|
|
104
107
|
includeCardNames = includeCardNames === VOID ? null : includeCardNames;
|
|
105
108
|
suit = suit === VOID ? null : suit;
|
|
106
|
-
return $super === VOID ? this.
|
|
109
|
+
return $super === VOID ? this.c67(cards, supportedCombinations, checkFromIndex, includeCardNames, suit) : $super.c67.call(this, cards, supportedCombinations, checkFromIndex, includeCardNames, suit);
|
|
107
110
|
}
|
|
108
111
|
function findSameCardsNumberCombinations$default(cards, cardsCount, includeCardNames, $super) {
|
|
109
112
|
cardsCount = cardsCount === VOID ? 4 : cardsCount;
|
|
110
113
|
includeCardNames = includeCardNames === VOID ? null : includeCardNames;
|
|
111
|
-
return $super === VOID ? this.
|
|
114
|
+
return $super === VOID ? this.e67(cards, cardsCount, includeCardNames) : $super.e67.call(this, cards, cardsCount, includeCardNames);
|
|
112
115
|
}
|
|
113
116
|
initMetadataForInterface(CombinationsCheckerProvider, 'CombinationsCheckerProvider');
|
|
114
|
-
initMetadataForClass(sam$kotlin_Comparator$0, 'sam$kotlin_Comparator$0', VOID, VOID, [Comparator]);
|
|
117
|
+
initMetadataForClass(sam$kotlin_Comparator$0, 'sam$kotlin_Comparator$0', VOID, VOID, [Comparator, FunctionAdapter]);
|
|
115
118
|
initMetadataForClass(CombinationsCheckerProviderImpl, 'CombinationsCheckerProviderImpl', CombinationsCheckerProviderImpl, VOID, [CombinationsCheckerProvider]);
|
|
116
119
|
initMetadataForInterface(DealerReducer, 'DealerReducer');
|
|
117
120
|
initMetadataForClass(DealerReducerImpl, 'DealerReducerImpl', VOID, VOID, [DealerReducer]);
|
|
118
121
|
//endregion
|
|
119
122
|
function CoreConfig() {
|
|
120
|
-
this.version = '0.0.
|
|
123
|
+
this.version = '0.0.37';
|
|
121
124
|
}
|
|
122
|
-
protoOf(CoreConfig).
|
|
125
|
+
protoOf(CoreConfig).n2y = function () {
|
|
123
126
|
return this.version;
|
|
124
127
|
};
|
|
125
128
|
var CoreConfig_instance;
|
|
@@ -128,12 +131,12 @@
|
|
|
128
131
|
}
|
|
129
132
|
function CardIndexComparator() {
|
|
130
133
|
}
|
|
131
|
-
protoOf(CardIndexComparator).
|
|
132
|
-
return a.
|
|
134
|
+
protoOf(CardIndexComparator).m64 = function (a, b) {
|
|
135
|
+
return a.n64_1 - b.n64_1 | 0;
|
|
133
136
|
};
|
|
134
137
|
protoOf(CardIndexComparator).compare = function (a, b) {
|
|
135
138
|
var tmp = a instanceof GameCard ? a : THROW_CCE();
|
|
136
|
-
return this.
|
|
139
|
+
return this.m64(tmp, b instanceof GameCard ? b : THROW_CCE());
|
|
137
140
|
};
|
|
138
141
|
var CardIndexComparator_instance;
|
|
139
142
|
function CardIndexComparator_getInstance() {
|
|
@@ -155,12 +158,12 @@
|
|
|
155
158
|
}
|
|
156
159
|
function CardNumberComparator() {
|
|
157
160
|
}
|
|
158
|
-
protoOf(CardNumberComparator).
|
|
159
|
-
return b.
|
|
161
|
+
protoOf(CardNumberComparator).m64 = function (a, b) {
|
|
162
|
+
return b.o64() - a.o64() | 0;
|
|
160
163
|
};
|
|
161
164
|
protoOf(CardNumberComparator).compare = function (a, b) {
|
|
162
165
|
var tmp = a instanceof GameCard ? a : THROW_CCE();
|
|
163
|
-
return this.
|
|
166
|
+
return this.m64(tmp, b instanceof GameCard ? b : THROW_CCE());
|
|
164
167
|
};
|
|
165
168
|
var CardNumberComparator_instance;
|
|
166
169
|
function CardNumberComparator_getInstance() {
|
|
@@ -288,16 +291,16 @@
|
|
|
288
291
|
}
|
|
289
292
|
function Companion() {
|
|
290
293
|
}
|
|
291
|
-
protoOf(Companion).
|
|
294
|
+
protoOf(Companion).p64 = function (suit, number) {
|
|
292
295
|
return new GameCard(getNumber(Companion_instance_0, getName(Companion_instance_0, number), suit));
|
|
293
296
|
};
|
|
294
|
-
protoOf(Companion).
|
|
297
|
+
protoOf(Companion).q64 = function (suit, cardNumber) {
|
|
295
298
|
return new GameCard(getNumber(Companion_instance_0, cardNumber, suit));
|
|
296
299
|
};
|
|
297
|
-
protoOf(Companion).
|
|
300
|
+
protoOf(Companion).r64 = function (index) {
|
|
298
301
|
return new GameCard(index);
|
|
299
302
|
};
|
|
300
|
-
protoOf(Companion).
|
|
303
|
+
protoOf(Companion).s64 = function (position, playerIndex, previousStubCardWithMaxIndex, reverse) {
|
|
301
304
|
var tmp;
|
|
302
305
|
if (previousStubCardWithMaxIndex == null) {
|
|
303
306
|
tmp = null;
|
|
@@ -306,7 +309,7 @@
|
|
|
306
309
|
// Inline function 'kotlin.contracts.contract' call
|
|
307
310
|
var tmp_0;
|
|
308
311
|
// Inline function 'io.raspberryapps.card_game.core.data.models.cards.Companion.createUniqueStub.<anonymous>' call
|
|
309
|
-
if (previousStubCardWithMaxIndex.
|
|
312
|
+
if (previousStubCardWithMaxIndex.t64()) {
|
|
310
313
|
tmp_0 = previousStubCardWithMaxIndex;
|
|
311
314
|
} else {
|
|
312
315
|
tmp_0 = null;
|
|
@@ -314,8 +317,8 @@
|
|
|
314
317
|
tmp = tmp_0;
|
|
315
318
|
}
|
|
316
319
|
var tmp3_safe_receiver = tmp;
|
|
317
|
-
var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.
|
|
318
|
-
var tmp5_safe_receiver = tmp4_safe_receiver == null ? null : Companion_instance_0.
|
|
320
|
+
var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.n64_1;
|
|
321
|
+
var tmp5_safe_receiver = tmp4_safe_receiver == null ? null : Companion_instance_0.y64(tmp4_safe_receiver, playerIndex, reverse);
|
|
319
322
|
var tmp_1;
|
|
320
323
|
if (tmp5_safe_receiver == null) {
|
|
321
324
|
tmp_1 = null;
|
|
@@ -336,10 +339,10 @@
|
|
|
336
339
|
var index = tmp_2;
|
|
337
340
|
return new GameCard(index);
|
|
338
341
|
};
|
|
339
|
-
protoOf(Companion).
|
|
342
|
+
protoOf(Companion).z64 = function (position, playerIndex, previousStubCardWithMaxIndex, reverse, $super) {
|
|
340
343
|
previousStubCardWithMaxIndex = previousStubCardWithMaxIndex === VOID ? null : previousStubCardWithMaxIndex;
|
|
341
344
|
reverse = reverse === VOID ? false : reverse;
|
|
342
|
-
return $super === VOID ? this.
|
|
345
|
+
return $super === VOID ? this.s64(position, playerIndex, previousStubCardWithMaxIndex, reverse) : $super.s64.call(this, position, playerIndex, previousStubCardWithMaxIndex, reverse);
|
|
343
346
|
};
|
|
344
347
|
var Companion_instance;
|
|
345
348
|
function Companion_getInstance() {
|
|
@@ -443,7 +446,7 @@
|
|
|
443
446
|
return tmp;
|
|
444
447
|
}
|
|
445
448
|
function _get_isShirt__vd98rp($this) {
|
|
446
|
-
return $this.
|
|
449
|
+
return $this.n64_1 === 52;
|
|
447
450
|
}
|
|
448
451
|
function CardName(name, ordinal) {
|
|
449
452
|
Enum.call(this, name, ordinal);
|
|
@@ -452,12 +455,12 @@
|
|
|
452
455
|
return getShortName(this);
|
|
453
456
|
};
|
|
454
457
|
function Companion_0() {
|
|
455
|
-
this.
|
|
456
|
-
this.
|
|
457
|
-
this.
|
|
458
|
-
this.
|
|
458
|
+
this.u64_1 = -1;
|
|
459
|
+
this.v64_1 = 13;
|
|
460
|
+
this.w64_1 = 52;
|
|
461
|
+
this.x64_1 = 53;
|
|
459
462
|
}
|
|
460
|
-
protoOf(Companion_0).
|
|
463
|
+
protoOf(Companion_0).y64 = function (_this__u8e3s4, playerIndex, reverse) {
|
|
461
464
|
var tmp;
|
|
462
465
|
if (reverse) {
|
|
463
466
|
tmp = _this__u8e3s4 + (53 + imul(playerIndex, 14) | 0) | 0;
|
|
@@ -527,59 +530,59 @@
|
|
|
527
530
|
return CardName_STUB_instance;
|
|
528
531
|
}
|
|
529
532
|
function GameCard(index) {
|
|
530
|
-
this.
|
|
533
|
+
this.n64_1 = index;
|
|
531
534
|
}
|
|
532
|
-
protoOf(GameCard).
|
|
535
|
+
protoOf(GameCard).a65 = function () {
|
|
533
536
|
var tmp;
|
|
534
|
-
var containsArg = this.
|
|
537
|
+
var containsArg = this.n64_1;
|
|
535
538
|
if (0 <= containsArg ? containsArg <= 13 : false) {
|
|
536
539
|
tmp = Suit_DIAMOND_getInstance();
|
|
537
540
|
} else {
|
|
538
|
-
if (this.
|
|
541
|
+
if (this.n64_1 <= 26) {
|
|
539
542
|
tmp = Suit_SPADE_getInstance();
|
|
540
543
|
} else {
|
|
541
|
-
if (this.
|
|
544
|
+
if (this.n64_1 <= 39) {
|
|
542
545
|
tmp = Suit_HEART_getInstance();
|
|
543
546
|
} else {
|
|
544
|
-
if (this.
|
|
547
|
+
if (this.n64_1 <= 52) {
|
|
545
548
|
tmp = Suit_CLUB_getInstance();
|
|
546
549
|
} else {
|
|
547
|
-
throw IllegalStateException_init_$Create$('Invalid suitCard in Card.getValue() ' + this.
|
|
550
|
+
throw IllegalStateException_init_$Create$('Invalid suitCard in Card.getValue() ' + this.n64_1);
|
|
548
551
|
}
|
|
549
552
|
}
|
|
550
553
|
}
|
|
551
554
|
}
|
|
552
555
|
return tmp;
|
|
553
556
|
};
|
|
554
|
-
protoOf(GameCard).
|
|
557
|
+
protoOf(GameCard).o64 = function () {
|
|
555
558
|
var tmp;
|
|
556
|
-
if (this.
|
|
559
|
+
if (this.t64()) {
|
|
557
560
|
tmp = -1;
|
|
558
561
|
} else {
|
|
559
|
-
tmp = this.
|
|
562
|
+
tmp = this.n64_1 - imul(13, getIndex(this.a65())) | 0;
|
|
560
563
|
}
|
|
561
564
|
return tmp;
|
|
562
565
|
};
|
|
563
566
|
protoOf(GameCard).p2 = function () {
|
|
564
|
-
return this.
|
|
567
|
+
return this.t64() ? CardName_STUB_getInstance() : getName(Companion_instance_0, this.o64());
|
|
565
568
|
};
|
|
566
|
-
protoOf(GameCard).
|
|
567
|
-
return !_get_isShirt__vd98rp(this) && !this.
|
|
569
|
+
protoOf(GameCard).b65 = function () {
|
|
570
|
+
return !_get_isShirt__vd98rp(this) && !this.t64();
|
|
568
571
|
};
|
|
569
|
-
protoOf(GameCard).
|
|
570
|
-
return this.
|
|
572
|
+
protoOf(GameCard).t64 = function () {
|
|
573
|
+
return this.n64_1 >= 53;
|
|
571
574
|
};
|
|
572
575
|
protoOf(GameCard).toString = function () {
|
|
573
576
|
if (_get_isShirt__vd98rp(this)) {
|
|
574
577
|
return 'GameCard(SHIRT)';
|
|
575
578
|
}
|
|
576
|
-
if (this.
|
|
577
|
-
return 'GameCard(STUB, ' + this.
|
|
579
|
+
if (this.t64()) {
|
|
580
|
+
return 'GameCard(STUB, ' + this.n64_1 + ')';
|
|
578
581
|
}
|
|
579
|
-
return 'GameCard(' + this.
|
|
582
|
+
return 'GameCard(' + this.a65().toString() + this.p2().toString() + ', ' + this.n64_1 + ')';
|
|
580
583
|
};
|
|
581
584
|
protoOf(GameCard).hashCode = function () {
|
|
582
|
-
return this.
|
|
585
|
+
return this.n64_1;
|
|
583
586
|
};
|
|
584
587
|
protoOf(GameCard).equals = function (other) {
|
|
585
588
|
if (this === other)
|
|
@@ -587,12 +590,12 @@
|
|
|
587
590
|
if (!(other instanceof GameCard))
|
|
588
591
|
return false;
|
|
589
592
|
var tmp0_other_with_cast = other instanceof GameCard ? other : THROW_CCE();
|
|
590
|
-
if (!(this.
|
|
593
|
+
if (!(this.n64_1 === tmp0_other_with_cast.n64_1))
|
|
591
594
|
return false;
|
|
592
595
|
return true;
|
|
593
596
|
};
|
|
594
597
|
function _get_$cachedSerializer__te6jhj($this) {
|
|
595
|
-
return $this.
|
|
598
|
+
return $this.c65_1.u();
|
|
596
599
|
}
|
|
597
600
|
function Suit$Companion$_anonymous__cbm2iq() {
|
|
598
601
|
return createSimpleEnumSerializer('io.raspberryapps.card_game.core.data.models.cards.Suit', values());
|
|
@@ -634,13 +637,13 @@
|
|
|
634
637
|
Companion_instance_1 = this;
|
|
635
638
|
var tmp = this;
|
|
636
639
|
var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
637
|
-
tmp.
|
|
640
|
+
tmp.c65_1 = lazy(tmp_0, Suit$Companion$_anonymous__cbm2iq);
|
|
638
641
|
}
|
|
639
|
-
protoOf(Companion_1).
|
|
642
|
+
protoOf(Companion_1).w4v = function () {
|
|
640
643
|
return _get_$cachedSerializer__te6jhj(this);
|
|
641
644
|
};
|
|
642
|
-
protoOf(Companion_1).
|
|
643
|
-
return this.
|
|
645
|
+
protoOf(Companion_1).t4f = function (typeParamsSerializers) {
|
|
646
|
+
return this.w4v();
|
|
644
647
|
};
|
|
645
648
|
var Companion_instance_1;
|
|
646
649
|
function Companion_getInstance_1() {
|
|
@@ -738,9 +741,9 @@
|
|
|
738
741
|
}
|
|
739
742
|
function getRandomOrgCards($this, leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundsCount, userData, signed, $completion) {
|
|
740
743
|
var tmp = new $getRandomOrgCardsCOROUTINE$1($this, leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundsCount, userData, signed, $completion);
|
|
741
|
-
tmp.
|
|
742
|
-
tmp.
|
|
743
|
-
return tmp.
|
|
744
|
+
tmp.j9_1 = Unit_instance;
|
|
745
|
+
tmp.k9_1 = null;
|
|
746
|
+
return tmp.p9();
|
|
744
747
|
}
|
|
745
748
|
function normalizeCards($this, cards, leftCardIndexForEachSuit) {
|
|
746
749
|
var oneSuitCount = cards.m() / get_entries().m() | 0;
|
|
@@ -761,7 +764,7 @@
|
|
|
761
764
|
}
|
|
762
765
|
function Companion_2() {
|
|
763
766
|
}
|
|
764
|
-
protoOf(Companion_2).
|
|
767
|
+
protoOf(Companion_2).d66 = function (randomPoolProvider, logger) {
|
|
765
768
|
var tmp17_random = new SecureRandom(logger);
|
|
766
769
|
return new CardsDealerProviderImpl(tmp17_random, randomPoolProvider, logger);
|
|
767
770
|
};
|
|
@@ -771,41 +774,41 @@
|
|
|
771
774
|
}
|
|
772
775
|
function $createNewShuffledCardDeckCOROUTINE$0(_this__u8e3s4, leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundCountForGame, userData, provider, resultContinuation) {
|
|
773
776
|
CoroutineImpl.call(this, resultContinuation);
|
|
774
|
-
this.
|
|
775
|
-
this.
|
|
776
|
-
this.
|
|
777
|
-
this.
|
|
778
|
-
this.
|
|
779
|
-
this.
|
|
780
|
-
}
|
|
781
|
-
protoOf($createNewShuffledCardDeckCOROUTINE$0).
|
|
782
|
-
var suspendResult = this.
|
|
777
|
+
this.m66_1 = _this__u8e3s4;
|
|
778
|
+
this.n66_1 = leftCardIndexForEachSuit;
|
|
779
|
+
this.o66_1 = rightCardIndexForEachSuit;
|
|
780
|
+
this.p66_1 = approximateRoundCountForGame;
|
|
781
|
+
this.q66_1 = userData;
|
|
782
|
+
this.r66_1 = provider;
|
|
783
|
+
}
|
|
784
|
+
protoOf($createNewShuffledCardDeckCOROUTINE$0).p9 = function () {
|
|
785
|
+
var suspendResult = this.j9_1;
|
|
783
786
|
$sm: do
|
|
784
787
|
try {
|
|
785
|
-
var tmp = this.
|
|
788
|
+
var tmp = this.h9_1;
|
|
786
789
|
switch (tmp) {
|
|
787
790
|
case 0:
|
|
788
|
-
this.
|
|
789
|
-
this.
|
|
790
|
-
this.
|
|
791
|
-
if (this.
|
|
791
|
+
this.i9_1 = 4;
|
|
792
|
+
this.s66_1 = this.r66_1;
|
|
793
|
+
this.t66_1 = this.s66_1.o2_1;
|
|
794
|
+
if (this.t66_1 === 0) {
|
|
792
795
|
var tmp_0 = this;
|
|
793
|
-
var it = this.
|
|
794
|
-
tmp_0.
|
|
795
|
-
this.
|
|
796
|
+
var it = this.m66_1.d65(this.n66_1, this.o66_1);
|
|
797
|
+
tmp_0.u66_1 = this.m66_1.h65(it);
|
|
798
|
+
this.h9_1 = 3;
|
|
796
799
|
continue $sm;
|
|
797
800
|
} else {
|
|
798
|
-
if (this.
|
|
799
|
-
this.
|
|
800
|
-
suspendResult = getRandomOrgCards(this.
|
|
801
|
+
if (this.t66_1 === 1) {
|
|
802
|
+
this.h9_1 = 2;
|
|
803
|
+
suspendResult = getRandomOrgCards(this.m66_1, this.n66_1, this.o66_1, this.p66_1, this.q66_1, false, this);
|
|
801
804
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
802
805
|
return suspendResult;
|
|
803
806
|
}
|
|
804
807
|
continue $sm;
|
|
805
808
|
} else {
|
|
806
|
-
if (this.
|
|
807
|
-
this.
|
|
808
|
-
suspendResult = getRandomOrgCards(this.
|
|
809
|
+
if (this.t66_1 === 2) {
|
|
810
|
+
this.h9_1 = 1;
|
|
811
|
+
suspendResult = getRandomOrgCards(this.m66_1, this.n66_1, this.o66_1, this.p66_1, this.q66_1, true, this);
|
|
809
812
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
810
813
|
return suspendResult;
|
|
811
814
|
}
|
|
@@ -819,95 +822,95 @@
|
|
|
819
822
|
|
|
820
823
|
break;
|
|
821
824
|
case 1:
|
|
822
|
-
this.
|
|
823
|
-
this.
|
|
825
|
+
this.u66_1 = suspendResult;
|
|
826
|
+
this.h9_1 = 3;
|
|
824
827
|
continue $sm;
|
|
825
828
|
case 2:
|
|
826
|
-
this.
|
|
827
|
-
this.
|
|
829
|
+
this.u66_1 = suspendResult;
|
|
830
|
+
this.h9_1 = 3;
|
|
828
831
|
continue $sm;
|
|
829
832
|
case 3:
|
|
830
|
-
return this.
|
|
833
|
+
return this.u66_1;
|
|
831
834
|
case 4:
|
|
832
|
-
throw this.
|
|
835
|
+
throw this.k9_1;
|
|
833
836
|
}
|
|
834
837
|
} catch ($p) {
|
|
835
838
|
var e = $p;
|
|
836
|
-
if (this.
|
|
839
|
+
if (this.i9_1 === 4) {
|
|
837
840
|
throw e;
|
|
838
841
|
} else {
|
|
839
|
-
this.
|
|
840
|
-
this.
|
|
842
|
+
this.h9_1 = this.i9_1;
|
|
843
|
+
this.k9_1 = e;
|
|
841
844
|
}
|
|
842
845
|
}
|
|
843
846
|
while (true);
|
|
844
847
|
};
|
|
845
848
|
function $getRandomOrgCardsCOROUTINE$1(_this__u8e3s4, leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundsCount, userData, signed, resultContinuation) {
|
|
846
849
|
CoroutineImpl.call(this, resultContinuation);
|
|
847
|
-
this.
|
|
848
|
-
this.
|
|
849
|
-
this.
|
|
850
|
-
this.
|
|
851
|
-
this.
|
|
852
|
-
this.
|
|
853
|
-
}
|
|
854
|
-
protoOf($getRandomOrgCardsCOROUTINE$1).
|
|
855
|
-
var suspendResult = this.
|
|
850
|
+
this.q65_1 = _this__u8e3s4;
|
|
851
|
+
this.r65_1 = leftCardIndexForEachSuit;
|
|
852
|
+
this.s65_1 = rightCardIndexForEachSuit;
|
|
853
|
+
this.t65_1 = approximateRoundsCount;
|
|
854
|
+
this.u65_1 = userData;
|
|
855
|
+
this.v65_1 = signed;
|
|
856
|
+
}
|
|
857
|
+
protoOf($getRandomOrgCardsCOROUTINE$1).p9 = function () {
|
|
858
|
+
var suspendResult = this.j9_1;
|
|
856
859
|
$sm: do
|
|
857
860
|
try {
|
|
858
|
-
var tmp = this.
|
|
861
|
+
var tmp = this.h9_1;
|
|
859
862
|
switch (tmp) {
|
|
860
863
|
case 0:
|
|
861
|
-
this.
|
|
864
|
+
this.i9_1 = 5;
|
|
862
865
|
var tmp_0 = this;
|
|
863
866
|
var sum = 0;
|
|
864
867
|
var tmp0_iterator = get_entries().j();
|
|
865
868
|
while (tmp0_iterator.k()) {
|
|
866
869
|
var element = tmp0_iterator.l();
|
|
867
870
|
var tmp_1 = sum;
|
|
868
|
-
sum = tmp_1 + count(getCardsRange(this.
|
|
871
|
+
sum = tmp_1 + count(getCardsRange(this.q65_1, this.r65_1, this.s65_1)) | 0;
|
|
869
872
|
}
|
|
870
873
|
|
|
871
|
-
tmp_0.
|
|
872
|
-
this.
|
|
873
|
-
this.
|
|
874
|
-
this.
|
|
875
|
-
suspendResult = this.
|
|
874
|
+
tmp_0.w65_1 = sum;
|
|
875
|
+
this.x65_1 = this.q65_1.w66_1;
|
|
876
|
+
this.y65_1 = this.w65_1 - 1 | 0;
|
|
877
|
+
this.h9_1 = 1;
|
|
878
|
+
suspendResult = this.x65_1.d5q(this.t65_1, this.u65_1, 0, this.y65_1, this.w65_1, this.v65_1, VOID, this);
|
|
876
879
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
877
880
|
return suspendResult;
|
|
878
881
|
}
|
|
879
882
|
|
|
880
|
-
this.
|
|
883
|
+
this.h9_1 = 2;
|
|
881
884
|
continue $sm;
|
|
882
885
|
case 1:
|
|
883
|
-
this.
|
|
884
|
-
suspendResult = new Result(this.
|
|
885
|
-
this.
|
|
886
|
+
this.z65_1 = suspendResult.ek_1;
|
|
887
|
+
suspendResult = new Result(this.z65_1);
|
|
888
|
+
this.h9_1 = 2;
|
|
886
889
|
continue $sm;
|
|
887
890
|
case 2:
|
|
888
|
-
this.
|
|
889
|
-
if (_Result___get_isSuccess__impl__sndoy8(this.
|
|
891
|
+
this.a66_1 = suspendResult.ek_1;
|
|
892
|
+
if (_Result___get_isSuccess__impl__sndoy8(this.a66_1)) {
|
|
890
893
|
var tmp_2 = this;
|
|
891
|
-
var this_0 = this.
|
|
894
|
+
var this_0 = this.a66_1;
|
|
892
895
|
throwOnFailure(this_0);
|
|
893
896
|
var tmp_3 = _Result___get_value__impl__bjfvqg(this_0);
|
|
894
897
|
var tmp14_cards = ((tmp_3 == null ? true : !(tmp_3 == null)) ? tmp_3 : THROW_CCE()).cards;
|
|
895
|
-
var this_1 = normalizeCards(this.
|
|
898
|
+
var this_1 = normalizeCards(this.q65_1, tmp14_cards, this.r65_1);
|
|
896
899
|
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_1, 10));
|
|
897
900
|
var tmp0_iterator_0 = this_1.j();
|
|
898
901
|
while (tmp0_iterator_0.k()) {
|
|
899
902
|
var item = tmp0_iterator_0.l();
|
|
900
|
-
destination.e(Companion_instance.
|
|
903
|
+
destination.e(Companion_instance.r64(item));
|
|
901
904
|
}
|
|
902
|
-
tmp_2.
|
|
903
|
-
this.
|
|
905
|
+
tmp_2.b66_1 = destination;
|
|
906
|
+
this.h9_1 = 4;
|
|
904
907
|
continue $sm;
|
|
905
908
|
} else {
|
|
906
|
-
this.
|
|
907
|
-
var tmp15_safe_receiver = this.
|
|
908
|
-
this.
|
|
909
|
-
this.
|
|
910
|
-
suspendResult = this.
|
|
909
|
+
this.c66_1 = Result__exceptionOrNull_impl_p6xea9(this.a66_1);
|
|
910
|
+
var tmp15_safe_receiver = this.c66_1;
|
|
911
|
+
this.q65_1.x66_1.w('CardsDealerProvider', 'createNewShuffledCardDeck error message = ' + (tmp15_safe_receiver == null ? null : tmp15_safe_receiver.message), this.c66_1);
|
|
912
|
+
this.h9_1 = 3;
|
|
913
|
+
suspendResult = this.q65_1.e65(this.r65_1, this.s65_1, this.t65_1, this.u65_1, CardsRandomProvider_CUSTOM_getInstance(), this);
|
|
911
914
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
912
915
|
return suspendResult;
|
|
913
916
|
}
|
|
@@ -915,31 +918,31 @@
|
|
|
915
918
|
}
|
|
916
919
|
|
|
917
920
|
case 3:
|
|
918
|
-
this.
|
|
919
|
-
this.
|
|
921
|
+
this.b66_1 = suspendResult;
|
|
922
|
+
this.h9_1 = 4;
|
|
920
923
|
continue $sm;
|
|
921
924
|
case 4:
|
|
922
|
-
return this.
|
|
925
|
+
return this.b66_1;
|
|
923
926
|
case 5:
|
|
924
|
-
throw this.
|
|
927
|
+
throw this.k9_1;
|
|
925
928
|
}
|
|
926
929
|
} catch ($p) {
|
|
927
930
|
var e = $p;
|
|
928
|
-
if (this.
|
|
931
|
+
if (this.i9_1 === 5) {
|
|
929
932
|
throw e;
|
|
930
933
|
} else {
|
|
931
|
-
this.
|
|
932
|
-
this.
|
|
934
|
+
this.h9_1 = this.i9_1;
|
|
935
|
+
this.k9_1 = e;
|
|
933
936
|
}
|
|
934
937
|
}
|
|
935
938
|
while (true);
|
|
936
939
|
};
|
|
937
940
|
function CardsDealerProviderImpl(random, randomPoolProvider, logger) {
|
|
938
|
-
this.
|
|
939
|
-
this.
|
|
940
|
-
this.
|
|
941
|
+
this.v66_1 = random;
|
|
942
|
+
this.w66_1 = randomPoolProvider;
|
|
943
|
+
this.x66_1 = logger;
|
|
941
944
|
}
|
|
942
|
-
protoOf(CardsDealerProviderImpl).
|
|
945
|
+
protoOf(CardsDealerProviderImpl).d65 = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit) {
|
|
943
946
|
// Inline function 'kotlin.collections.flatMap' call
|
|
944
947
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
945
948
|
var this_0 = get_entries();
|
|
@@ -952,25 +955,30 @@
|
|
|
952
955
|
var this_1 = getCardsRange(this, leftCardIndexForEachSuit, rightCardIndexForEachSuit);
|
|
953
956
|
// Inline function 'kotlin.collections.mapTo' call
|
|
954
957
|
var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_1, 10));
|
|
955
|
-
var
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
958
|
+
var inductionVariable = this_1.a1_1;
|
|
959
|
+
var last = this_1.b1_1;
|
|
960
|
+
if (inductionVariable <= last)
|
|
961
|
+
do {
|
|
962
|
+
var item = inductionVariable;
|
|
963
|
+
inductionVariable = inductionVariable + 1 | 0;
|
|
964
|
+
// Inline function 'io.raspberryapps.card_game.core.data.providers.cards.CardsDealerProviderImpl.createNewCardDeck.<anonymous>.<anonymous>' call
|
|
965
|
+
var it = item;
|
|
966
|
+
var tmp$ret$0 = Companion_instance.p64(element, it);
|
|
967
|
+
destination_0.e(tmp$ret$0);
|
|
968
|
+
}
|
|
969
|
+
while (!(item === last));
|
|
962
970
|
var list = destination_0;
|
|
963
971
|
addAll(destination, list);
|
|
964
972
|
}
|
|
965
973
|
return destination;
|
|
966
974
|
};
|
|
967
|
-
protoOf(CardsDealerProviderImpl).
|
|
975
|
+
protoOf(CardsDealerProviderImpl).e65 = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundCountForGame, userData, provider, $completion) {
|
|
968
976
|
var tmp = new $createNewShuffledCardDeckCOROUTINE$0(this, leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundCountForGame, userData, provider, $completion);
|
|
969
|
-
tmp.
|
|
970
|
-
tmp.
|
|
971
|
-
return tmp.
|
|
977
|
+
tmp.j9_1 = Unit_instance;
|
|
978
|
+
tmp.k9_1 = null;
|
|
979
|
+
return tmp.p9();
|
|
972
980
|
};
|
|
973
|
-
protoOf(CardsDealerProviderImpl).
|
|
981
|
+
protoOf(CardsDealerProviderImpl).f65 = function (count, cards) {
|
|
974
982
|
// Inline function 'kotlin.apply' call
|
|
975
983
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
976
984
|
var this_0 = ArrayList_init_$Create$();
|
|
@@ -1004,7 +1012,7 @@
|
|
|
1004
1012
|
while (tmp0_iterator.k()) {
|
|
1005
1013
|
var element = tmp0_iterator.l();
|
|
1006
1014
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.cards.CardsDealerProviderImpl.getNRandomUniqueCards.<anonymous>.<anonymous>' call
|
|
1007
|
-
if (element.
|
|
1015
|
+
if (element.o64() === card.o64()) {
|
|
1008
1016
|
tmp$ret$2 = true;
|
|
1009
1017
|
break $l$block_1;
|
|
1010
1018
|
}
|
|
@@ -1019,7 +1027,7 @@
|
|
|
1019
1027
|
}
|
|
1020
1028
|
return this_0;
|
|
1021
1029
|
};
|
|
1022
|
-
protoOf(CardsDealerProviderImpl).
|
|
1030
|
+
protoOf(CardsDealerProviderImpl).g65 = function (cards, times) {
|
|
1023
1031
|
// Inline function 'kotlin.let' call
|
|
1024
1032
|
// Inline function 'kotlin.contracts.contract' call
|
|
1025
1033
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.cards.CardsDealerProviderImpl.standardShuffledCards.<anonymous>' call
|
|
@@ -1029,49 +1037,49 @@
|
|
|
1029
1037
|
do {
|
|
1030
1038
|
var i = inductionVariable;
|
|
1031
1039
|
inductionVariable = inductionVariable + 1 | 0;
|
|
1032
|
-
shuffled = this.
|
|
1040
|
+
shuffled = this.v66_1.d5v(shuffled);
|
|
1033
1041
|
}
|
|
1034
1042
|
while (inductionVariable < times);
|
|
1035
1043
|
return shuffled;
|
|
1036
1044
|
};
|
|
1037
1045
|
function Companion_3() {
|
|
1038
1046
|
}
|
|
1039
|
-
protoOf(Companion_3).
|
|
1047
|
+
protoOf(Companion_3).y66 = function () {
|
|
1040
1048
|
// Inline function 'kotlin.apply' call
|
|
1041
1049
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
1042
1050
|
var this_0 = ArrayList_init_$Create$();
|
|
1043
1051
|
// Inline function 'kotlin.contracts.contract' call
|
|
1044
1052
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.cards.Companion.getCards.<anonymous>' call
|
|
1045
|
-
this_0.n(listOf([Companion_instance.
|
|
1046
|
-
this_0.n(listOf([Companion_instance.
|
|
1047
|
-
this_0.n(listOf([Companion_instance.
|
|
1048
|
-
this_0.n(listOf([Companion_instance.
|
|
1049
|
-
this_0.n(listOf([Companion_instance.
|
|
1053
|
+
this_0.n(listOf([Companion_instance.q64(Suit_DIAMOND_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.q64(Suit_CLUB_getInstance(), CardName_NINE_getInstance()), Companion_instance.q64(Suit_CLUB_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.q64(Suit_CLUB_getInstance(), CardName_TEN_getInstance()), Companion_instance.q64(Suit_HEART_getInstance(), CardName_JACK_getInstance()), Companion_instance.q64(Suit_HEART_getInstance(), CardName_KING_getInstance())]));
|
|
1054
|
+
this_0.n(listOf([Companion_instance.q64(Suit_CLUB_getInstance(), CardName_JACK_getInstance()), Companion_instance.q64(Suit_SPADE_getInstance(), CardName_ACE_getInstance()), Companion_instance.q64(Suit_DIAMOND_getInstance(), CardName_NINE_getInstance()), Companion_instance.q64(Suit_DIAMOND_getInstance(), CardName_TEN_getInstance()), Companion_instance.q64(Suit_DIAMOND_getInstance(), CardName_JACK_getInstance()), Companion_instance.q64(Suit_HEART_getInstance(), CardName_EIGHT_getInstance())]));
|
|
1055
|
+
this_0.n(listOf([Companion_instance.q64(Suit_CLUB_getInstance(), CardName_DAME_getInstance()), Companion_instance.q64(Suit_HEART_getInstance(), CardName_ACE_getInstance()), Companion_instance.q64(Suit_HEART_getInstance(), CardName_DAME_getInstance()), Companion_instance.q64(Suit_HEART_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.q64(Suit_SPADE_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.q64(Suit_CLUB_getInstance(), CardName_KING_getInstance())]));
|
|
1056
|
+
this_0.n(listOf([Companion_instance.q64(Suit_SPADE_getInstance(), CardName_EIGHT_getInstance()), Companion_instance.q64(Suit_SPADE_getInstance(), CardName_TEN_getInstance()), Companion_instance.q64(Suit_HEART_getInstance(), CardName_TEN_getInstance()), Companion_instance.q64(Suit_SPADE_getInstance(), CardName_JACK_getInstance()), Companion_instance.q64(Suit_DIAMOND_getInstance(), CardName_EIGHT_getInstance()), Companion_instance.q64(Suit_SPADE_getInstance(), CardName_DAME_getInstance())]));
|
|
1057
|
+
this_0.n(listOf([Companion_instance.q64(Suit_DIAMOND_getInstance(), CardName_ACE_getInstance()), Companion_instance.q64(Suit_CLUB_getInstance(), CardName_EIGHT_getInstance()), Companion_instance.q64(Suit_DIAMOND_getInstance(), CardName_KING_getInstance()), Companion_instance.q64(Suit_SPADE_getInstance(), CardName_NINE_getInstance()), Companion_instance.q64(Suit_CLUB_getInstance(), CardName_ACE_getInstance()), Companion_instance.q64(Suit_SPADE_getInstance(), CardName_KING_getInstance()), Companion_instance.q64(Suit_DIAMOND_getInstance(), CardName_DAME_getInstance()), Companion_instance.q64(Suit_HEART_getInstance(), CardName_NINE_getInstance())]));
|
|
1050
1058
|
return this_0;
|
|
1051
1059
|
};
|
|
1052
|
-
protoOf(Companion_3).
|
|
1053
|
-
return listOf([Companion_instance.
|
|
1060
|
+
protoOf(Companion_3).z66 = function () {
|
|
1061
|
+
return listOf([Companion_instance.q64(Suit_CLUB_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.q64(Suit_HEART_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.q64(Suit_SPADE_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.q64(Suit_SPADE_getInstance(), CardName_EIGHT_getInstance())]);
|
|
1054
1062
|
};
|
|
1055
1063
|
var Companion_instance_3;
|
|
1056
1064
|
function Companion_getInstance_3() {
|
|
1057
1065
|
return Companion_instance_3;
|
|
1058
1066
|
}
|
|
1059
1067
|
function FakeCardsDealerProvider(cards, cardsForLot) {
|
|
1060
|
-
cards = cards === VOID ? Companion_instance_3.
|
|
1061
|
-
cardsForLot = cardsForLot === VOID ? Companion_instance_3.
|
|
1062
|
-
this.
|
|
1063
|
-
this.
|
|
1068
|
+
cards = cards === VOID ? Companion_instance_3.y66() : cards;
|
|
1069
|
+
cardsForLot = cardsForLot === VOID ? Companion_instance_3.z66() : cardsForLot;
|
|
1070
|
+
this.a67_1 = cards;
|
|
1071
|
+
this.b67_1 = cardsForLot;
|
|
1064
1072
|
}
|
|
1065
|
-
protoOf(FakeCardsDealerProvider).
|
|
1066
|
-
return this.
|
|
1073
|
+
protoOf(FakeCardsDealerProvider).d65 = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit) {
|
|
1074
|
+
return this.a67_1;
|
|
1067
1075
|
};
|
|
1068
|
-
protoOf(FakeCardsDealerProvider).
|
|
1069
|
-
return this.
|
|
1076
|
+
protoOf(FakeCardsDealerProvider).e65 = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundCountForGame, userData, provider, $completion) {
|
|
1077
|
+
return this.a67_1;
|
|
1070
1078
|
};
|
|
1071
|
-
protoOf(FakeCardsDealerProvider).
|
|
1072
|
-
return this.
|
|
1079
|
+
protoOf(FakeCardsDealerProvider).f65 = function (count, cards) {
|
|
1080
|
+
return this.b67_1;
|
|
1073
1081
|
};
|
|
1074
|
-
protoOf(FakeCardsDealerProvider).
|
|
1082
|
+
protoOf(FakeCardsDealerProvider).g65 = function (cards, times) {
|
|
1075
1083
|
return cards;
|
|
1076
1084
|
};
|
|
1077
1085
|
function CombinationsCheckerProvider() {
|
|
@@ -1100,25 +1108,46 @@
|
|
|
1100
1108
|
return takeLast(cards, longestCombinationSupport);
|
|
1101
1109
|
}
|
|
1102
1110
|
function sam$kotlin_Comparator$0(function_0) {
|
|
1103
|
-
this.
|
|
1111
|
+
this.h67_1 = function_0;
|
|
1104
1112
|
}
|
|
1105
|
-
protoOf(sam$kotlin_Comparator$0).
|
|
1106
|
-
return this.
|
|
1113
|
+
protoOf(sam$kotlin_Comparator$0).pc = function (a, b) {
|
|
1114
|
+
return this.h67_1(a, b);
|
|
1107
1115
|
};
|
|
1108
1116
|
protoOf(sam$kotlin_Comparator$0).compare = function (a, b) {
|
|
1109
|
-
return this.
|
|
1117
|
+
return this.pc(a, b);
|
|
1118
|
+
};
|
|
1119
|
+
protoOf(sam$kotlin_Comparator$0).p3 = function () {
|
|
1120
|
+
return this.h67_1;
|
|
1121
|
+
};
|
|
1122
|
+
protoOf(sam$kotlin_Comparator$0).equals = function (other) {
|
|
1123
|
+
var tmp;
|
|
1124
|
+
if (!(other == null) ? isInterface(other, Comparator) : false) {
|
|
1125
|
+
var tmp_0;
|
|
1126
|
+
if (!(other == null) ? isInterface(other, FunctionAdapter) : false) {
|
|
1127
|
+
tmp_0 = equals(this.p3(), other.p3());
|
|
1128
|
+
} else {
|
|
1129
|
+
tmp_0 = false;
|
|
1130
|
+
}
|
|
1131
|
+
tmp = tmp_0;
|
|
1132
|
+
} else {
|
|
1133
|
+
tmp = false;
|
|
1134
|
+
}
|
|
1135
|
+
return tmp;
|
|
1136
|
+
};
|
|
1137
|
+
protoOf(sam$kotlin_Comparator$0).hashCode = function () {
|
|
1138
|
+
return hashCode(this.p3());
|
|
1110
1139
|
};
|
|
1111
1140
|
function CombinationsCheckerProviderImpl$createCombinationsFromCardsInRow$lambda(a, b) {
|
|
1112
1141
|
// Inline function 'kotlin.comparisons.compareValuesBy' call
|
|
1113
1142
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.combinations.CombinationsCheckerProviderImpl.createCombinationsFromCardsInRow.<anonymous>' call
|
|
1114
|
-
var tmp = first_0(a).
|
|
1143
|
+
var tmp = first_0(a).n64_1;
|
|
1115
1144
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.combinations.CombinationsCheckerProviderImpl.createCombinationsFromCardsInRow.<anonymous>' call
|
|
1116
|
-
var tmp$ret$1 = first_0(b).
|
|
1145
|
+
var tmp$ret$1 = first_0(b).n64_1;
|
|
1117
1146
|
return compareValues(tmp, tmp$ret$1);
|
|
1118
1147
|
}
|
|
1119
1148
|
function CombinationsCheckerProviderImpl() {
|
|
1120
1149
|
}
|
|
1121
|
-
protoOf(CombinationsCheckerProviderImpl).
|
|
1150
|
+
protoOf(CombinationsCheckerProviderImpl).c67 = function (cards, supportedCombinations, checkFromIndex, includeCardNames, suit) {
|
|
1122
1151
|
// Inline function 'kotlin.collections.filter' call
|
|
1123
1152
|
// Inline function 'kotlin.apply' call
|
|
1124
1153
|
var this_0 = toMutableList(cards);
|
|
@@ -1131,7 +1160,7 @@
|
|
|
1131
1160
|
while (tmp0_iterator.k()) {
|
|
1132
1161
|
var element = tmp0_iterator.l();
|
|
1133
1162
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.combinations.CombinationsCheckerProviderImpl.findCardsInRowCombinations.<anonymous>' call
|
|
1134
|
-
if (element.
|
|
1163
|
+
if (element.b65()) {
|
|
1135
1164
|
destination.e(element);
|
|
1136
1165
|
}
|
|
1137
1166
|
}
|
|
@@ -1148,14 +1177,14 @@
|
|
|
1148
1177
|
inductionVariable = inductionVariable + 1 | 0;
|
|
1149
1178
|
var previousCard = lastOrNull(combinationCards);
|
|
1150
1179
|
var currentCard = sortedByIndexCards.o(i);
|
|
1151
|
-
var isNextInRow = !(previousCard == null) && currentCard.
|
|
1180
|
+
var isNextInRow = !(previousCard == null) && currentCard.n64_1 === (previousCard.n64_1 + 1 | 0) && currentCard.a65().equals(previousCard.a65());
|
|
1152
1181
|
var passedCardNamesCheck = includeCardNames == null || includeCardNames.s1(currentCard.p2());
|
|
1153
|
-
var passedSuitCheck = suit == null || currentCard.
|
|
1182
|
+
var passedSuitCheck = suit == null || currentCard.a65().equals(suit);
|
|
1154
1183
|
if (isNextInRow && passedSuitCheck && passedCardNamesCheck) {
|
|
1155
1184
|
combinationCards.e(currentCard);
|
|
1156
1185
|
} else {
|
|
1157
1186
|
if (combinationCards.m() > (checkFromIndex - 1 | 0)) {
|
|
1158
|
-
combinations.n(this.
|
|
1187
|
+
combinations.n(this.g67(toMutableList(combinationCards), supportedCombinations));
|
|
1159
1188
|
}
|
|
1160
1189
|
combinationCards.a2();
|
|
1161
1190
|
if (passedSuitCheck && passedCardNamesCheck) {
|
|
@@ -1165,11 +1194,11 @@
|
|
|
1165
1194
|
}
|
|
1166
1195
|
while (inductionVariable <= last);
|
|
1167
1196
|
if (combinationCards.m() > (checkFromIndex - 1 | 0)) {
|
|
1168
|
-
combinations.n(this.
|
|
1197
|
+
combinations.n(this.g67(toMutableList(combinationCards), supportedCombinations));
|
|
1169
1198
|
}
|
|
1170
1199
|
return combinations;
|
|
1171
1200
|
};
|
|
1172
|
-
protoOf(CombinationsCheckerProviderImpl).
|
|
1201
|
+
protoOf(CombinationsCheckerProviderImpl).e67 = function (cards, cardsCount, includeCardNames) {
|
|
1173
1202
|
// Inline function 'kotlin.collections.filter' call
|
|
1174
1203
|
// Inline function 'kotlin.collections.filter' call
|
|
1175
1204
|
// Inline function 'kotlin.apply' call
|
|
@@ -1183,7 +1212,7 @@
|
|
|
1183
1212
|
while (tmp0_iterator.k()) {
|
|
1184
1213
|
var element = tmp0_iterator.l();
|
|
1185
1214
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.combinations.CombinationsCheckerProviderImpl.findSameCardsNumberCombinations.<anonymous>' call
|
|
1186
|
-
if (element.
|
|
1215
|
+
if (element.b65()) {
|
|
1187
1216
|
destination.e(element);
|
|
1188
1217
|
}
|
|
1189
1218
|
}
|
|
@@ -1206,7 +1235,7 @@
|
|
|
1206
1235
|
while (tmp0_iterator_1.k()) {
|
|
1207
1236
|
var element_1 = tmp0_iterator_1.l();
|
|
1208
1237
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.combinations.CombinationsCheckerProviderImpl.findSameCardsNumberCombinations.<anonymous>' call
|
|
1209
|
-
var key = element_1.
|
|
1238
|
+
var key = element_1.o64();
|
|
1210
1239
|
// Inline function 'kotlin.collections.getOrPut' call
|
|
1211
1240
|
var value = destination_1.h2(key);
|
|
1212
1241
|
var tmp;
|
|
@@ -1245,7 +1274,7 @@
|
|
|
1245
1274
|
}
|
|
1246
1275
|
return destination_3;
|
|
1247
1276
|
};
|
|
1248
|
-
protoOf(CombinationsCheckerProviderImpl).
|
|
1277
|
+
protoOf(CombinationsCheckerProviderImpl).g67 = function (cards, supportedCombinations) {
|
|
1249
1278
|
// Inline function 'kotlin.collections.minOf' call
|
|
1250
1279
|
var iterator = supportedCombinations.j();
|
|
1251
1280
|
if (!iterator.k())
|
|
@@ -1275,28 +1304,28 @@
|
|
|
1275
1304
|
return sortedWith(combinations, tmp$ret$4);
|
|
1276
1305
|
};
|
|
1277
1306
|
function DealerReducerImpl(logger, enableLogs) {
|
|
1278
|
-
this.
|
|
1279
|
-
this.
|
|
1307
|
+
this.i67_1 = logger;
|
|
1308
|
+
this.j67_1 = enableLogs;
|
|
1280
1309
|
}
|
|
1281
|
-
protoOf(DealerReducerImpl).
|
|
1310
|
+
protoOf(DealerReducerImpl).k67 = function (cards, cardsToRemove) {
|
|
1282
1311
|
var list = cards;
|
|
1283
1312
|
var _iterator__ex2g4s = cardsToRemove.j();
|
|
1284
1313
|
while (_iterator__ex2g4s.k()) {
|
|
1285
1314
|
var gameCard = _iterator__ex2g4s.l();
|
|
1286
|
-
list = this.
|
|
1315
|
+
list = this.l67(list, gameCard);
|
|
1287
1316
|
}
|
|
1288
1317
|
return list;
|
|
1289
1318
|
};
|
|
1290
|
-
protoOf(DealerReducerImpl).
|
|
1319
|
+
protoOf(DealerReducerImpl).l67 = function (cards, cardToRemove) {
|
|
1291
1320
|
var tmp;
|
|
1292
|
-
if (!cardToRemove.
|
|
1293
|
-
if (this.
|
|
1294
|
-
this.
|
|
1321
|
+
if (!cardToRemove.t64() && cards.s1(cardToRemove)) {
|
|
1322
|
+
if (this.j67_1) {
|
|
1323
|
+
this.i67_1.d('Dealer', 'Card removed: ' + cardToRemove.toString() + ', size: ' + (cards.m() - 1 | 0));
|
|
1295
1324
|
}
|
|
1296
1325
|
tmp = minus(cards, cardToRemove);
|
|
1297
1326
|
} else {
|
|
1298
|
-
if (this.
|
|
1299
|
-
this.
|
|
1327
|
+
if (this.j67_1) {
|
|
1328
|
+
this.i67_1.d('Dealer', 'Card removed as stub: ' + cardToRemove.toString() + ', size: ' + (cards.m() - 1 | 0));
|
|
1300
1329
|
}
|
|
1301
1330
|
// Inline function 'kotlin.collections.filterNot' call
|
|
1302
1331
|
// Inline function 'kotlin.collections.filterNotTo' call
|
|
@@ -1305,7 +1334,7 @@
|
|
|
1305
1334
|
while (tmp0_iterator.k()) {
|
|
1306
1335
|
var element = tmp0_iterator.l();
|
|
1307
1336
|
// Inline function 'io.raspberryapps.card_game.core.domain.dealer.DealerReducerImpl.removeCard.<anonymous>' call
|
|
1308
|
-
if (!element.
|
|
1337
|
+
if (!element.t64()) {
|
|
1309
1338
|
destination.e(element);
|
|
1310
1339
|
}
|
|
1311
1340
|
}
|
|
@@ -1317,34 +1346,34 @@
|
|
|
1317
1346
|
while (tmp0_iterator_0.k()) {
|
|
1318
1347
|
var element_0 = tmp0_iterator_0.l();
|
|
1319
1348
|
// Inline function 'io.raspberryapps.card_game.core.domain.dealer.DealerReducerImpl.removeCard.<anonymous>' call
|
|
1320
|
-
if (element_0.
|
|
1349
|
+
if (element_0.t64()) {
|
|
1321
1350
|
destination_0.e(element_0);
|
|
1322
1351
|
}
|
|
1323
1352
|
}
|
|
1324
1353
|
var stubCards = destination_0;
|
|
1325
1354
|
if (stubCards.p()) {
|
|
1326
|
-
this.
|
|
1355
|
+
this.i67_1.w('Dealer', "Can't find card to delete for player, " + ('cards:' + toString(cards) + ', ') + ('cardToRemove: ' + cardToRemove.toString()));
|
|
1327
1356
|
}
|
|
1328
1357
|
tmp = plus(notStubCards, dropLast(stubCards, 1));
|
|
1329
1358
|
}
|
|
1330
1359
|
return tmp;
|
|
1331
1360
|
};
|
|
1332
|
-
protoOf(DealerReducerImpl).
|
|
1333
|
-
if (this.
|
|
1334
|
-
this.
|
|
1361
|
+
protoOf(DealerReducerImpl).m67 = function (cards, cardToAdd) {
|
|
1362
|
+
if (this.j67_1) {
|
|
1363
|
+
this.i67_1.d('Dealer', 'Card added: ' + cardToAdd.toString() + ', size: ' + (cards.m() + 1 | 0));
|
|
1335
1364
|
}
|
|
1336
1365
|
if (cards.s1(cardToAdd)) {
|
|
1337
|
-
this.
|
|
1366
|
+
this.i67_1.w('Dealer', 'Card already exists for player, ' + ('cards:' + toString(cards) + ', ') + ('cardToAdd: ' + cardToAdd.toString()));
|
|
1338
1367
|
}
|
|
1339
1368
|
return plus_0(cards, cardToAdd);
|
|
1340
1369
|
};
|
|
1341
1370
|
function DealerReducer() {
|
|
1342
1371
|
}
|
|
1343
1372
|
//region block: post-declaration
|
|
1344
|
-
protoOf(CardsDealerProviderImpl).
|
|
1345
|
-
protoOf(FakeCardsDealerProvider).
|
|
1346
|
-
protoOf(CombinationsCheckerProviderImpl).
|
|
1347
|
-
protoOf(CombinationsCheckerProviderImpl).
|
|
1373
|
+
protoOf(CardsDealerProviderImpl).h65 = standardShuffledCards$default;
|
|
1374
|
+
protoOf(FakeCardsDealerProvider).h65 = standardShuffledCards$default;
|
|
1375
|
+
protoOf(CombinationsCheckerProviderImpl).d67 = findCardsInRowCombinations$default;
|
|
1376
|
+
protoOf(CombinationsCheckerProviderImpl).f67 = findSameCardsNumberCombinations$default;
|
|
1348
1377
|
//endregion
|
|
1349
1378
|
//region block: init
|
|
1350
1379
|
CoreConfig_instance = new CoreConfig();
|