raspberry_games_server_game_logic 1.8.292 → 1.8.294
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 +71 -71
- package/Kosi-Kodein-kodein-di.js +629 -629
- package/Kotlin-DateTime-library-kotlinx-datetime.js +1443 -1443
- package/Logic_Debertz-core.js +1871 -1895
- package/Logic_Debertz-core.js.map +1 -1
- package/Logic_Debertz-engine.js +15683 -15664
- package/Logic_Debertz-engine.js.map +1 -1
- package/Logic_Debertz-game_server.d.ts +9 -5
- package/Logic_Debertz-game_server.js +1406 -1406
- package/kotlin-kotlin-stdlib.js +2291 -2110
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kotlinx-atomicfu.js +25 -25
- package/kotlinx-coroutines-core.js +2890 -2884
- package/kotlinx-coroutines-core.js.map +1 -1
- package/kotlinx-io-kotlinx-io-core.js +354 -354
- package/kotlinx-serialization-kotlinx-serialization-core.js +1882 -1882
- package/kotlinx-serialization-kotlinx-serialization-json.js +1517 -1517
- package/ktor-ktor-client-content-negotiation.js +213 -213
- package/ktor-ktor-client-core.js +2494 -2494
- package/ktor-ktor-client-logging.js +547 -547
- package/ktor-ktor-events.js +11 -11
- package/ktor-ktor-http.js +721 -721
- package/ktor-ktor-io.js +1624 -1624
- package/ktor-ktor-serialization-kotlinx-json.js +7 -7
- package/ktor-ktor-serialization-kotlinx.js +261 -261
- package/ktor-ktor-serialization.js +129 -129
- package/ktor-ktor-utils.js +699 -699
- package/ktor-ktor-websockets.js +57 -57
- package/package.json +1 -1
- package/raspberry-cardgame-lib-core.js +257 -243
- package/raspberry-cardgame-lib-core.js.map +1 -1
- package/raspberry-cardgame-lib-logger.js +97 -97
- package/raspberry-cardgame-lib-random.js +1056 -964
- package/raspberry-cardgame-lib-random.js.map +1 -1
- package/secure-random-secure-random.js +17 -17
- package/uuid.js +23 -23
|
@@ -19,62 +19,64 @@
|
|
|
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.$_$.vc;
|
|
23
|
+
var initMetadataForObject = kotlin_kotlin.$_$.zb;
|
|
24
|
+
var defineProp = kotlin_kotlin.$_$.lb;
|
|
25
|
+
var THROW_CCE = kotlin_kotlin.$_$.sg;
|
|
26
|
+
var Comparator = kotlin_kotlin.$_$.fg;
|
|
27
27
|
var VOID = kotlin_kotlin.$_$.f;
|
|
28
|
-
var take = kotlin_kotlin.$_$.
|
|
29
|
-
var toList = kotlin_kotlin.$_$.
|
|
28
|
+
var take = kotlin_kotlin.$_$.p9;
|
|
29
|
+
var toList = kotlin_kotlin.$_$.t9;
|
|
30
30
|
var Unit_instance = kotlin_kotlin.$_$.p5;
|
|
31
|
-
var takeLast = kotlin_kotlin.$_$.
|
|
31
|
+
var takeLast = kotlin_kotlin.$_$.o9;
|
|
32
32
|
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.n;
|
|
33
|
-
var noWhenBranchMatchedException = kotlin_kotlin.$_$.
|
|
34
|
-
var initMetadataForCompanion = kotlin_kotlin.$_$.
|
|
33
|
+
var noWhenBranchMatchedException = kotlin_kotlin.$_$.qh;
|
|
34
|
+
var initMetadataForCompanion = kotlin_kotlin.$_$.vb;
|
|
35
35
|
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.w1;
|
|
36
|
-
var Enum = kotlin_kotlin.$_$.
|
|
37
|
-
var initMetadataForClass = kotlin_kotlin.$_$.
|
|
36
|
+
var Enum = kotlin_kotlin.$_$.ig;
|
|
37
|
+
var initMetadataForClass = kotlin_kotlin.$_$.ub;
|
|
38
38
|
var createSimpleEnumSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.e2;
|
|
39
|
-
var enumEntries = kotlin_kotlin.$_$.
|
|
39
|
+
var enumEntries = kotlin_kotlin.$_$.ya;
|
|
40
40
|
var LazyThreadSafetyMode_PUBLICATION_getInstance = kotlin_kotlin.$_$.k;
|
|
41
|
-
var lazy = kotlin_kotlin.$_$.
|
|
41
|
+
var lazy = kotlin_kotlin.$_$.oh;
|
|
42
42
|
var SerializerFactory = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.c2;
|
|
43
|
-
var initMetadataForInterface = kotlin_kotlin.$_$.
|
|
44
|
-
var until = kotlin_kotlin.$_$.
|
|
43
|
+
var initMetadataForInterface = kotlin_kotlin.$_$.xb;
|
|
44
|
+
var until = kotlin_kotlin.$_$.ld;
|
|
45
45
|
var collectionSizeOrDefault = kotlin_kotlin.$_$.s6;
|
|
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.$_$.
|
|
49
|
-
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.
|
|
50
|
-
var initMetadataForCoroutine = kotlin_kotlin.$_$.
|
|
48
|
+
var CoroutineImpl = kotlin_kotlin.$_$.wa;
|
|
49
|
+
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.ha;
|
|
50
|
+
var initMetadataForCoroutine = kotlin_kotlin.$_$.wb;
|
|
51
51
|
var count = kotlin_kotlin.$_$.j7;
|
|
52
|
-
var Result = kotlin_kotlin.$_$.
|
|
52
|
+
var Result = kotlin_kotlin.$_$.qg;
|
|
53
53
|
var Result__exceptionOrNull_impl_p6xea9 = kotlin_kotlin.$_$.g3;
|
|
54
|
-
var throwOnFailure = kotlin_kotlin.$_$.
|
|
54
|
+
var throwOnFailure = kotlin_kotlin.$_$.uh;
|
|
55
55
|
var _Result___get_value__impl__bjfvqg = kotlin_kotlin.$_$.j3;
|
|
56
56
|
var _Result___get_isSuccess__impl__sndoy8 = kotlin_kotlin.$_$.i3;
|
|
57
57
|
var addAll = kotlin_kotlin.$_$.g6;
|
|
58
58
|
var Collection = kotlin_kotlin.$_$.r5;
|
|
59
|
-
var isInterface = kotlin_kotlin.$_$.
|
|
60
|
-
var toMutableList = kotlin_kotlin.$_$.
|
|
59
|
+
var isInterface = kotlin_kotlin.$_$.ic;
|
|
60
|
+
var toMutableList = kotlin_kotlin.$_$.x9;
|
|
61
|
+
var riffle = kotlin_io_raspberryapps_cardgame_random.$_$.l;
|
|
62
|
+
var overhand = kotlin_io_raspberryapps_cardgame_random.$_$.k;
|
|
61
63
|
var listOf = kotlin_kotlin.$_$.q8;
|
|
62
64
|
var first = kotlin_kotlin.$_$.v7;
|
|
63
|
-
var sorted = kotlin_kotlin.$_$.
|
|
65
|
+
var sorted = kotlin_kotlin.$_$.m9;
|
|
64
66
|
var asReversed = kotlin_kotlin.$_$.k6;
|
|
65
67
|
var NoSuchElementException_init_$Create$ = kotlin_kotlin.$_$.d2;
|
|
66
|
-
var equals = kotlin_kotlin.$_$.
|
|
67
|
-
var FunctionAdapter = kotlin_kotlin.$_$.
|
|
68
|
-
var hashCode = kotlin_kotlin.$_$.
|
|
68
|
+
var equals = kotlin_kotlin.$_$.mb;
|
|
69
|
+
var FunctionAdapter = kotlin_kotlin.$_$.ab;
|
|
70
|
+
var hashCode = kotlin_kotlin.$_$.tb;
|
|
69
71
|
var first_0 = kotlin_kotlin.$_$.u7;
|
|
70
|
-
var compareValues = kotlin_kotlin.$_$.
|
|
71
|
-
var sortWith = kotlin_kotlin.$_$.
|
|
72
|
+
var compareValues = kotlin_kotlin.$_$.fa;
|
|
73
|
+
var sortWith = kotlin_kotlin.$_$.k9;
|
|
72
74
|
var lastOrNull = kotlin_kotlin.$_$.k8;
|
|
73
75
|
var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.w;
|
|
74
|
-
var sortedWith = kotlin_kotlin.$_$.
|
|
76
|
+
var sortedWith = kotlin_kotlin.$_$.l9;
|
|
75
77
|
var NoSuchElementException_init_$Create$_0 = kotlin_kotlin.$_$.b2;
|
|
76
|
-
var compareTo = kotlin_kotlin.$_$.
|
|
77
|
-
var toString = kotlin_kotlin.$_$.
|
|
78
|
+
var compareTo = kotlin_kotlin.$_$.kb;
|
|
79
|
+
var toString = kotlin_kotlin.$_$.zc;
|
|
78
80
|
var dropLast = kotlin_kotlin.$_$.l7;
|
|
79
81
|
var plus = kotlin_kotlin.$_$.z8;
|
|
80
82
|
var minus = kotlin_kotlin.$_$.u8;
|
|
@@ -93,7 +95,11 @@
|
|
|
93
95
|
initMetadataForClass(CardsRandomProvider, 'CardsRandomProvider', VOID, Enum);
|
|
94
96
|
function standardShuffledCards$default(cards, times, $super) {
|
|
95
97
|
times = times === VOID ? 3 : times;
|
|
96
|
-
return $super === VOID ? this.
|
|
98
|
+
return $super === VOID ? this.h67(cards, times) : $super.h67.call(this, cards, times);
|
|
99
|
+
}
|
|
100
|
+
function realLifeShuffledCards$default(cards, times, $super) {
|
|
101
|
+
times = times === VOID ? 20 : times;
|
|
102
|
+
return $super === VOID ? this.j67(cards, times) : $super.j67.call(this, cards, times);
|
|
97
103
|
}
|
|
98
104
|
initMetadataForInterface(CardsDealerProvider, 'CardsDealerProvider', VOID, VOID, VOID, [5]);
|
|
99
105
|
initMetadataForCompanion(Companion_2);
|
|
@@ -106,12 +112,12 @@
|
|
|
106
112
|
checkFromIndex = checkFromIndex === VOID ? first(supportedCombinations) : checkFromIndex;
|
|
107
113
|
includeCardNames = includeCardNames === VOID ? null : includeCardNames;
|
|
108
114
|
suit = suit === VOID ? null : suit;
|
|
109
|
-
return $super === VOID ? this.
|
|
115
|
+
return $super === VOID ? this.f69(cards, supportedCombinations, checkFromIndex, includeCardNames, suit) : $super.f69.call(this, cards, supportedCombinations, checkFromIndex, includeCardNames, suit);
|
|
110
116
|
}
|
|
111
117
|
function findSameCardsNumberCombinations$default(cards, cardsCount, includeCardNames, $super) {
|
|
112
118
|
cardsCount = cardsCount === VOID ? 4 : cardsCount;
|
|
113
119
|
includeCardNames = includeCardNames === VOID ? null : includeCardNames;
|
|
114
|
-
return $super === VOID ? this.
|
|
120
|
+
return $super === VOID ? this.h69(cards, cardsCount, includeCardNames) : $super.h69.call(this, cards, cardsCount, includeCardNames);
|
|
115
121
|
}
|
|
116
122
|
initMetadataForInterface(CombinationsCheckerProvider, 'CombinationsCheckerProvider');
|
|
117
123
|
initMetadataForClass(sam$kotlin_Comparator$0, 'sam$kotlin_Comparator$0', VOID, VOID, [Comparator, FunctionAdapter]);
|
|
@@ -122,7 +128,7 @@
|
|
|
122
128
|
function CoreConfig() {
|
|
123
129
|
this.version = '0.0.39';
|
|
124
130
|
}
|
|
125
|
-
protoOf(CoreConfig).
|
|
131
|
+
protoOf(CoreConfig).r2z = function () {
|
|
126
132
|
return this.version;
|
|
127
133
|
};
|
|
128
134
|
var CoreConfig_instance;
|
|
@@ -131,12 +137,12 @@
|
|
|
131
137
|
}
|
|
132
138
|
function CardIndexComparator() {
|
|
133
139
|
}
|
|
134
|
-
protoOf(CardIndexComparator).
|
|
135
|
-
return a.
|
|
140
|
+
protoOf(CardIndexComparator).n66 = function (a, b) {
|
|
141
|
+
return a.o66_1 - b.o66_1 | 0;
|
|
136
142
|
};
|
|
137
143
|
protoOf(CardIndexComparator).compare = function (a, b) {
|
|
138
144
|
var tmp = a instanceof GameCard ? a : THROW_CCE();
|
|
139
|
-
return this.
|
|
145
|
+
return this.n66(tmp, b instanceof GameCard ? b : THROW_CCE());
|
|
140
146
|
};
|
|
141
147
|
var CardIndexComparator_instance;
|
|
142
148
|
function CardIndexComparator_getInstance() {
|
|
@@ -144,12 +150,12 @@
|
|
|
144
150
|
}
|
|
145
151
|
function CardNumberComparator() {
|
|
146
152
|
}
|
|
147
|
-
protoOf(CardNumberComparator).
|
|
148
|
-
return b.
|
|
153
|
+
protoOf(CardNumberComparator).n66 = function (a, b) {
|
|
154
|
+
return b.p66() - a.p66() | 0;
|
|
149
155
|
};
|
|
150
156
|
protoOf(CardNumberComparator).compare = function (a, b) {
|
|
151
157
|
var tmp = a instanceof GameCard ? a : THROW_CCE();
|
|
152
|
-
return this.
|
|
158
|
+
return this.n66(tmp, b instanceof GameCard ? b : THROW_CCE());
|
|
153
159
|
};
|
|
154
160
|
var CardNumberComparator_instance;
|
|
155
161
|
function CardNumberComparator_getInstance() {
|
|
@@ -194,7 +200,7 @@
|
|
|
194
200
|
var element = indexedObject[inductionVariable];
|
|
195
201
|
inductionVariable = inductionVariable + 1 | 0;
|
|
196
202
|
// Inline function 'io.raspberryapps.card_game.core.data.models.cards.byCardNamePredicate.<anonymous>.<anonymous>' call
|
|
197
|
-
if (p1.
|
|
203
|
+
if (p1.p2().equals(element)) {
|
|
198
204
|
tmp$ret$1 = true;
|
|
199
205
|
break $l$block;
|
|
200
206
|
}
|
|
@@ -220,7 +226,7 @@
|
|
|
220
226
|
var CardName_STUB_instance;
|
|
221
227
|
function getShortName($this) {
|
|
222
228
|
var tmp;
|
|
223
|
-
switch ($this.
|
|
229
|
+
switch ($this.o2_1) {
|
|
224
230
|
case 0:
|
|
225
231
|
tmp = 'A';
|
|
226
232
|
break;
|
|
@@ -291,16 +297,16 @@
|
|
|
291
297
|
}
|
|
292
298
|
function Companion() {
|
|
293
299
|
}
|
|
294
|
-
protoOf(Companion).
|
|
300
|
+
protoOf(Companion).q66 = function (suit, number) {
|
|
295
301
|
return new GameCard(getNumber(Companion_instance_0, getName(Companion_instance_0, number), suit));
|
|
296
302
|
};
|
|
297
|
-
protoOf(Companion).
|
|
303
|
+
protoOf(Companion).r66 = function (suit, cardNumber) {
|
|
298
304
|
return new GameCard(getNumber(Companion_instance_0, cardNumber, suit));
|
|
299
305
|
};
|
|
300
|
-
protoOf(Companion).
|
|
306
|
+
protoOf(Companion).s66 = function (index) {
|
|
301
307
|
return new GameCard(index);
|
|
302
308
|
};
|
|
303
|
-
protoOf(Companion).
|
|
309
|
+
protoOf(Companion).t66 = function (position, playerIndex, previousStubCardWithMaxIndex, reverse) {
|
|
304
310
|
var tmp;
|
|
305
311
|
if (previousStubCardWithMaxIndex == null) {
|
|
306
312
|
tmp = null;
|
|
@@ -309,7 +315,7 @@
|
|
|
309
315
|
// Inline function 'kotlin.contracts.contract' call
|
|
310
316
|
var tmp_0;
|
|
311
317
|
// Inline function 'io.raspberryapps.card_game.core.data.models.cards.Companion.createUniqueStub.<anonymous>' call
|
|
312
|
-
if (previousStubCardWithMaxIndex.
|
|
318
|
+
if (previousStubCardWithMaxIndex.u66()) {
|
|
313
319
|
tmp_0 = previousStubCardWithMaxIndex;
|
|
314
320
|
} else {
|
|
315
321
|
tmp_0 = null;
|
|
@@ -317,8 +323,8 @@
|
|
|
317
323
|
tmp = tmp_0;
|
|
318
324
|
}
|
|
319
325
|
var tmp3_safe_receiver = tmp;
|
|
320
|
-
var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.
|
|
321
|
-
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.o66_1;
|
|
327
|
+
var tmp5_safe_receiver = tmp4_safe_receiver == null ? null : Companion_instance_0.z66(tmp4_safe_receiver, playerIndex, reverse);
|
|
322
328
|
var tmp_1;
|
|
323
329
|
if (tmp5_safe_receiver == null) {
|
|
324
330
|
tmp_1 = null;
|
|
@@ -339,10 +345,10 @@
|
|
|
339
345
|
var index = tmp_2;
|
|
340
346
|
return new GameCard(index);
|
|
341
347
|
};
|
|
342
|
-
protoOf(Companion).
|
|
348
|
+
protoOf(Companion).a67 = function (position, playerIndex, previousStubCardWithMaxIndex, reverse, $super) {
|
|
343
349
|
previousStubCardWithMaxIndex = previousStubCardWithMaxIndex === VOID ? null : previousStubCardWithMaxIndex;
|
|
344
350
|
reverse = reverse === VOID ? false : reverse;
|
|
345
|
-
return $super === VOID ? this.
|
|
351
|
+
return $super === VOID ? this.t66(position, playerIndex, previousStubCardWithMaxIndex, reverse) : $super.t66.call(this, position, playerIndex, previousStubCardWithMaxIndex, reverse);
|
|
346
352
|
};
|
|
347
353
|
var Companion_instance;
|
|
348
354
|
function Companion_getInstance() {
|
|
@@ -353,7 +359,7 @@
|
|
|
353
359
|
}
|
|
354
360
|
function getCardNumber($this, number) {
|
|
355
361
|
var tmp;
|
|
356
|
-
switch (number.
|
|
362
|
+
switch (number.o2_1) {
|
|
357
363
|
case 12:
|
|
358
364
|
tmp = 0;
|
|
359
365
|
break;
|
|
@@ -446,7 +452,7 @@
|
|
|
446
452
|
return tmp;
|
|
447
453
|
}
|
|
448
454
|
function _get_isShirt__vd98rp($this) {
|
|
449
|
-
return $this.
|
|
455
|
+
return $this.o66_1 === 52;
|
|
450
456
|
}
|
|
451
457
|
function CardName(name, ordinal) {
|
|
452
458
|
Enum.call(this, name, ordinal);
|
|
@@ -455,12 +461,12 @@
|
|
|
455
461
|
return getShortName(this);
|
|
456
462
|
};
|
|
457
463
|
function Companion_0() {
|
|
458
|
-
this.
|
|
459
|
-
this.
|
|
460
|
-
this.
|
|
461
|
-
this.
|
|
464
|
+
this.v66_1 = -1;
|
|
465
|
+
this.w66_1 = 13;
|
|
466
|
+
this.x66_1 = 52;
|
|
467
|
+
this.y66_1 = 53;
|
|
462
468
|
}
|
|
463
|
-
protoOf(Companion_0).
|
|
469
|
+
protoOf(Companion_0).z66 = function (_this__u8e3s4, playerIndex, reverse) {
|
|
464
470
|
var tmp;
|
|
465
471
|
if (reverse) {
|
|
466
472
|
tmp = _this__u8e3s4 + (53 + imul(playerIndex, 14) | 0) | 0;
|
|
@@ -530,59 +536,59 @@
|
|
|
530
536
|
return CardName_STUB_instance;
|
|
531
537
|
}
|
|
532
538
|
function GameCard(index) {
|
|
533
|
-
this.
|
|
539
|
+
this.o66_1 = index;
|
|
534
540
|
}
|
|
535
|
-
protoOf(GameCard).
|
|
541
|
+
protoOf(GameCard).b67 = function () {
|
|
536
542
|
var tmp;
|
|
537
|
-
var containsArg = this.
|
|
543
|
+
var containsArg = this.o66_1;
|
|
538
544
|
if (0 <= containsArg ? containsArg <= 13 : false) {
|
|
539
545
|
tmp = Suit_DIAMOND_getInstance();
|
|
540
546
|
} else {
|
|
541
|
-
if (this.
|
|
547
|
+
if (this.o66_1 <= 26) {
|
|
542
548
|
tmp = Suit_SPADE_getInstance();
|
|
543
549
|
} else {
|
|
544
|
-
if (this.
|
|
550
|
+
if (this.o66_1 <= 39) {
|
|
545
551
|
tmp = Suit_HEART_getInstance();
|
|
546
552
|
} else {
|
|
547
|
-
if (this.
|
|
553
|
+
if (this.o66_1 <= 52) {
|
|
548
554
|
tmp = Suit_CLUB_getInstance();
|
|
549
555
|
} else {
|
|
550
|
-
throw IllegalStateException_init_$Create$('Invalid suitCard in Card.getValue() ' + this.
|
|
556
|
+
throw IllegalStateException_init_$Create$('Invalid suitCard in Card.getValue() ' + this.o66_1);
|
|
551
557
|
}
|
|
552
558
|
}
|
|
553
559
|
}
|
|
554
560
|
}
|
|
555
561
|
return tmp;
|
|
556
562
|
};
|
|
557
|
-
protoOf(GameCard).
|
|
563
|
+
protoOf(GameCard).p66 = function () {
|
|
558
564
|
var tmp;
|
|
559
|
-
if (this.
|
|
565
|
+
if (this.u66()) {
|
|
560
566
|
tmp = -1;
|
|
561
567
|
} else {
|
|
562
|
-
tmp = this.
|
|
568
|
+
tmp = this.o66_1 - imul(13, getIndex(this.b67())) | 0;
|
|
563
569
|
}
|
|
564
570
|
return tmp;
|
|
565
571
|
};
|
|
566
|
-
protoOf(GameCard).
|
|
567
|
-
return this.
|
|
572
|
+
protoOf(GameCard).p2 = function () {
|
|
573
|
+
return this.u66() ? CardName_STUB_getInstance() : getName(Companion_instance_0, this.p66());
|
|
568
574
|
};
|
|
569
|
-
protoOf(GameCard).
|
|
570
|
-
return !_get_isShirt__vd98rp(this) && !this.
|
|
575
|
+
protoOf(GameCard).c67 = function () {
|
|
576
|
+
return !_get_isShirt__vd98rp(this) && !this.u66();
|
|
571
577
|
};
|
|
572
|
-
protoOf(GameCard).
|
|
573
|
-
return this.
|
|
578
|
+
protoOf(GameCard).u66 = function () {
|
|
579
|
+
return this.o66_1 >= 53;
|
|
574
580
|
};
|
|
575
581
|
protoOf(GameCard).toString = function () {
|
|
576
582
|
if (_get_isShirt__vd98rp(this)) {
|
|
577
583
|
return 'GameCard(SHIRT)';
|
|
578
584
|
}
|
|
579
|
-
if (this.
|
|
580
|
-
return 'GameCard(STUB, ' + this.
|
|
585
|
+
if (this.u66()) {
|
|
586
|
+
return 'GameCard(STUB, ' + this.o66_1 + ')';
|
|
581
587
|
}
|
|
582
|
-
return 'GameCard(' + this.
|
|
588
|
+
return 'GameCard(' + this.b67().toString() + this.p2().toString() + ', ' + this.o66_1 + ')';
|
|
583
589
|
};
|
|
584
590
|
protoOf(GameCard).hashCode = function () {
|
|
585
|
-
return this.
|
|
591
|
+
return this.o66_1;
|
|
586
592
|
};
|
|
587
593
|
protoOf(GameCard).equals = function (other) {
|
|
588
594
|
if (this === other)
|
|
@@ -590,12 +596,12 @@
|
|
|
590
596
|
if (!(other instanceof GameCard))
|
|
591
597
|
return false;
|
|
592
598
|
var tmp0_other_with_cast = other instanceof GameCard ? other : THROW_CCE();
|
|
593
|
-
if (!(this.
|
|
599
|
+
if (!(this.o66_1 === tmp0_other_with_cast.o66_1))
|
|
594
600
|
return false;
|
|
595
601
|
return true;
|
|
596
602
|
};
|
|
597
603
|
function _get_$cachedSerializer__te6jhj($this) {
|
|
598
|
-
return $this.
|
|
604
|
+
return $this.d67_1.u();
|
|
599
605
|
}
|
|
600
606
|
function Suit$Companion$_anonymous__cbm2iq() {
|
|
601
607
|
return createSimpleEnumSerializer('io.raspberryapps.card_game.core.data.models.cards.Suit', values());
|
|
@@ -606,7 +612,7 @@
|
|
|
606
612
|
var Suit_CLUB_instance;
|
|
607
613
|
function getSuitEmoji($this) {
|
|
608
614
|
var tmp;
|
|
609
|
-
switch ($this.
|
|
615
|
+
switch ($this.o2_1) {
|
|
610
616
|
case 0:
|
|
611
617
|
tmp = '\u2666\uFE0F';
|
|
612
618
|
break;
|
|
@@ -637,13 +643,13 @@
|
|
|
637
643
|
Companion_instance_1 = this;
|
|
638
644
|
var tmp = this;
|
|
639
645
|
var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
640
|
-
tmp.
|
|
646
|
+
tmp.d67_1 = lazy(tmp_0, Suit$Companion$_anonymous__cbm2iq);
|
|
641
647
|
}
|
|
642
|
-
protoOf(Companion_1).
|
|
648
|
+
protoOf(Companion_1).a4x = function () {
|
|
643
649
|
return _get_$cachedSerializer__te6jhj(this);
|
|
644
650
|
};
|
|
645
|
-
protoOf(Companion_1).
|
|
646
|
-
return this.
|
|
651
|
+
protoOf(Companion_1).x4g = function (typeParamsSerializers) {
|
|
652
|
+
return this.a4x();
|
|
647
653
|
};
|
|
648
654
|
var Companion_instance_1;
|
|
649
655
|
function Companion_getInstance_1() {
|
|
@@ -688,7 +694,7 @@
|
|
|
688
694
|
}
|
|
689
695
|
function getIndex(_this__u8e3s4) {
|
|
690
696
|
var tmp;
|
|
691
|
-
switch (_this__u8e3s4.
|
|
697
|
+
switch (_this__u8e3s4.o2_1) {
|
|
692
698
|
case 0:
|
|
693
699
|
tmp = 0;
|
|
694
700
|
break;
|
|
@@ -741,9 +747,9 @@
|
|
|
741
747
|
}
|
|
742
748
|
function getRandomOrgCards($this, leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundsCount, userData, signed, $completion) {
|
|
743
749
|
var tmp = new $getRandomOrgCardsCOROUTINE$1($this, leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundsCount, userData, signed, $completion);
|
|
744
|
-
tmp.
|
|
745
|
-
tmp.
|
|
746
|
-
return tmp.
|
|
750
|
+
tmp.h9_1 = Unit_instance;
|
|
751
|
+
tmp.i9_1 = null;
|
|
752
|
+
return tmp.n9();
|
|
747
753
|
}
|
|
748
754
|
function normalizeCards($this, cards, leftCardIndexForEachSuit) {
|
|
749
755
|
var oneSuitCount = cards.m() / get_entries().m() | 0;
|
|
@@ -764,7 +770,7 @@
|
|
|
764
770
|
}
|
|
765
771
|
function Companion_2() {
|
|
766
772
|
}
|
|
767
|
-
protoOf(Companion_2).
|
|
773
|
+
protoOf(Companion_2).g68 = function (randomPoolProvider, logger) {
|
|
768
774
|
var tmp17_random = new SecureRandom(logger);
|
|
769
775
|
return new CardsDealerProviderImpl(tmp17_random, randomPoolProvider, logger);
|
|
770
776
|
};
|
|
@@ -774,41 +780,41 @@
|
|
|
774
780
|
}
|
|
775
781
|
function $createNewShuffledCardDeckCOROUTINE$0(_this__u8e3s4, leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundCountForGame, userData, provider, resultContinuation) {
|
|
776
782
|
CoroutineImpl.call(this, resultContinuation);
|
|
777
|
-
this.
|
|
778
|
-
this.
|
|
779
|
-
this.
|
|
780
|
-
this.
|
|
781
|
-
this.
|
|
782
|
-
this.
|
|
783
|
-
}
|
|
784
|
-
protoOf($createNewShuffledCardDeckCOROUTINE$0).
|
|
785
|
-
var suspendResult = this.
|
|
783
|
+
this.p68_1 = _this__u8e3s4;
|
|
784
|
+
this.q68_1 = leftCardIndexForEachSuit;
|
|
785
|
+
this.r68_1 = rightCardIndexForEachSuit;
|
|
786
|
+
this.s68_1 = approximateRoundCountForGame;
|
|
787
|
+
this.t68_1 = userData;
|
|
788
|
+
this.u68_1 = provider;
|
|
789
|
+
}
|
|
790
|
+
protoOf($createNewShuffledCardDeckCOROUTINE$0).n9 = function () {
|
|
791
|
+
var suspendResult = this.h9_1;
|
|
786
792
|
$sm: do
|
|
787
793
|
try {
|
|
788
|
-
var tmp = this.
|
|
794
|
+
var tmp = this.f9_1;
|
|
789
795
|
switch (tmp) {
|
|
790
796
|
case 0:
|
|
791
|
-
this.
|
|
792
|
-
this.
|
|
793
|
-
this.
|
|
794
|
-
if (this.
|
|
797
|
+
this.g9_1 = 4;
|
|
798
|
+
this.v68_1 = this.u68_1;
|
|
799
|
+
this.w68_1 = this.v68_1.o2_1;
|
|
800
|
+
if (this.w68_1 === 0) {
|
|
795
801
|
var tmp_0 = this;
|
|
796
|
-
var it = this.
|
|
797
|
-
tmp_0.
|
|
798
|
-
this.
|
|
802
|
+
var it = this.p68_1.e67(this.q68_1, this.r68_1);
|
|
803
|
+
tmp_0.x68_1 = this.p68_1.i67(it);
|
|
804
|
+
this.f9_1 = 3;
|
|
799
805
|
continue $sm;
|
|
800
806
|
} else {
|
|
801
|
-
if (this.
|
|
802
|
-
this.
|
|
803
|
-
suspendResult = getRandomOrgCards(this.
|
|
807
|
+
if (this.w68_1 === 1) {
|
|
808
|
+
this.f9_1 = 2;
|
|
809
|
+
suspendResult = getRandomOrgCards(this.p68_1, this.q68_1, this.r68_1, this.s68_1, this.t68_1, false, this);
|
|
804
810
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
805
811
|
return suspendResult;
|
|
806
812
|
}
|
|
807
813
|
continue $sm;
|
|
808
814
|
} else {
|
|
809
|
-
if (this.
|
|
810
|
-
this.
|
|
811
|
-
suspendResult = getRandomOrgCards(this.
|
|
815
|
+
if (this.w68_1 === 2) {
|
|
816
|
+
this.f9_1 = 1;
|
|
817
|
+
suspendResult = getRandomOrgCards(this.p68_1, this.q68_1, this.r68_1, this.s68_1, this.t68_1, true, this);
|
|
812
818
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
813
819
|
return suspendResult;
|
|
814
820
|
}
|
|
@@ -822,95 +828,95 @@
|
|
|
822
828
|
|
|
823
829
|
break;
|
|
824
830
|
case 1:
|
|
825
|
-
this.
|
|
826
|
-
this.
|
|
831
|
+
this.x68_1 = suspendResult;
|
|
832
|
+
this.f9_1 = 3;
|
|
827
833
|
continue $sm;
|
|
828
834
|
case 2:
|
|
829
|
-
this.
|
|
830
|
-
this.
|
|
835
|
+
this.x68_1 = suspendResult;
|
|
836
|
+
this.f9_1 = 3;
|
|
831
837
|
continue $sm;
|
|
832
838
|
case 3:
|
|
833
|
-
return this.
|
|
839
|
+
return this.x68_1;
|
|
834
840
|
case 4:
|
|
835
|
-
throw this.
|
|
841
|
+
throw this.i9_1;
|
|
836
842
|
}
|
|
837
843
|
} catch ($p) {
|
|
838
844
|
var e = $p;
|
|
839
|
-
if (this.
|
|
845
|
+
if (this.g9_1 === 4) {
|
|
840
846
|
throw e;
|
|
841
847
|
} else {
|
|
842
|
-
this.
|
|
843
|
-
this.
|
|
848
|
+
this.f9_1 = this.g9_1;
|
|
849
|
+
this.i9_1 = e;
|
|
844
850
|
}
|
|
845
851
|
}
|
|
846
852
|
while (true);
|
|
847
853
|
};
|
|
848
854
|
function $getRandomOrgCardsCOROUTINE$1(_this__u8e3s4, leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundsCount, userData, signed, resultContinuation) {
|
|
849
855
|
CoroutineImpl.call(this, resultContinuation);
|
|
850
|
-
this.
|
|
851
|
-
this.
|
|
852
|
-
this.
|
|
853
|
-
this.
|
|
854
|
-
this.
|
|
855
|
-
this.
|
|
856
|
-
}
|
|
857
|
-
protoOf($getRandomOrgCardsCOROUTINE$1).
|
|
858
|
-
var suspendResult = this.
|
|
856
|
+
this.t67_1 = _this__u8e3s4;
|
|
857
|
+
this.u67_1 = leftCardIndexForEachSuit;
|
|
858
|
+
this.v67_1 = rightCardIndexForEachSuit;
|
|
859
|
+
this.w67_1 = approximateRoundsCount;
|
|
860
|
+
this.x67_1 = userData;
|
|
861
|
+
this.y67_1 = signed;
|
|
862
|
+
}
|
|
863
|
+
protoOf($getRandomOrgCardsCOROUTINE$1).n9 = function () {
|
|
864
|
+
var suspendResult = this.h9_1;
|
|
859
865
|
$sm: do
|
|
860
866
|
try {
|
|
861
|
-
var tmp = this.
|
|
867
|
+
var tmp = this.f9_1;
|
|
862
868
|
switch (tmp) {
|
|
863
869
|
case 0:
|
|
864
|
-
this.
|
|
870
|
+
this.g9_1 = 5;
|
|
865
871
|
var tmp_0 = this;
|
|
866
872
|
var sum = 0;
|
|
867
873
|
var tmp0_iterator = get_entries().j();
|
|
868
874
|
while (tmp0_iterator.k()) {
|
|
869
875
|
var element = tmp0_iterator.l();
|
|
870
876
|
var tmp_1 = sum;
|
|
871
|
-
sum = tmp_1 + count(getCardsRange(this.
|
|
877
|
+
sum = tmp_1 + count(getCardsRange(this.t67_1, this.u67_1, this.v67_1)) | 0;
|
|
872
878
|
}
|
|
873
879
|
|
|
874
|
-
tmp_0.
|
|
875
|
-
this.
|
|
876
|
-
this.
|
|
877
|
-
this.
|
|
878
|
-
suspendResult = this.
|
|
880
|
+
tmp_0.z67_1 = sum;
|
|
881
|
+
this.a68_1 = this.t67_1.z68_1;
|
|
882
|
+
this.b68_1 = this.z67_1 - 1 | 0;
|
|
883
|
+
this.f9_1 = 1;
|
|
884
|
+
suspendResult = this.a68_1.h5r(this.w67_1, this.x67_1, 0, this.b68_1, this.z67_1, this.y67_1, VOID, this);
|
|
879
885
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
880
886
|
return suspendResult;
|
|
881
887
|
}
|
|
882
888
|
|
|
883
|
-
this.
|
|
889
|
+
this.f9_1 = 2;
|
|
884
890
|
continue $sm;
|
|
885
891
|
case 1:
|
|
886
|
-
this.
|
|
887
|
-
suspendResult = new Result(this.
|
|
888
|
-
this.
|
|
892
|
+
this.c68_1 = suspendResult.ek_1;
|
|
893
|
+
suspendResult = new Result(this.c68_1);
|
|
894
|
+
this.f9_1 = 2;
|
|
889
895
|
continue $sm;
|
|
890
896
|
case 2:
|
|
891
|
-
this.
|
|
892
|
-
if (_Result___get_isSuccess__impl__sndoy8(this.
|
|
897
|
+
this.d68_1 = suspendResult.ek_1;
|
|
898
|
+
if (_Result___get_isSuccess__impl__sndoy8(this.d68_1)) {
|
|
893
899
|
var tmp_2 = this;
|
|
894
|
-
var this_0 = this.
|
|
900
|
+
var this_0 = this.d68_1;
|
|
895
901
|
throwOnFailure(this_0);
|
|
896
902
|
var tmp_3 = _Result___get_value__impl__bjfvqg(this_0);
|
|
897
903
|
var tmp14_cards = ((tmp_3 == null ? true : !(tmp_3 == null)) ? tmp_3 : THROW_CCE()).cards;
|
|
898
|
-
var this_1 = normalizeCards(this.
|
|
904
|
+
var this_1 = normalizeCards(this.t67_1, tmp14_cards, this.u67_1);
|
|
899
905
|
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_1, 10));
|
|
900
906
|
var tmp0_iterator_0 = this_1.j();
|
|
901
907
|
while (tmp0_iterator_0.k()) {
|
|
902
908
|
var item = tmp0_iterator_0.l();
|
|
903
|
-
destination.e(Companion_instance.
|
|
909
|
+
destination.e(Companion_instance.s66(item));
|
|
904
910
|
}
|
|
905
|
-
tmp_2.
|
|
906
|
-
this.
|
|
911
|
+
tmp_2.e68_1 = destination;
|
|
912
|
+
this.f9_1 = 4;
|
|
907
913
|
continue $sm;
|
|
908
914
|
} else {
|
|
909
|
-
this.
|
|
910
|
-
var tmp15_safe_receiver = this.
|
|
911
|
-
this.
|
|
912
|
-
this.
|
|
913
|
-
suspendResult = this.
|
|
915
|
+
this.f68_1 = Result__exceptionOrNull_impl_p6xea9(this.d68_1);
|
|
916
|
+
var tmp15_safe_receiver = this.f68_1;
|
|
917
|
+
this.t67_1.a69_1.w('CardsDealerProvider', 'createNewShuffledCardDeck error message = ' + (tmp15_safe_receiver == null ? null : tmp15_safe_receiver.message), this.f68_1);
|
|
918
|
+
this.f9_1 = 3;
|
|
919
|
+
suspendResult = this.t67_1.f67(this.u67_1, this.v67_1, this.w67_1, this.x67_1, CardsRandomProvider_CUSTOM_getInstance(), this);
|
|
914
920
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
915
921
|
return suspendResult;
|
|
916
922
|
}
|
|
@@ -918,31 +924,31 @@
|
|
|
918
924
|
}
|
|
919
925
|
|
|
920
926
|
case 3:
|
|
921
|
-
this.
|
|
922
|
-
this.
|
|
927
|
+
this.e68_1 = suspendResult;
|
|
928
|
+
this.f9_1 = 4;
|
|
923
929
|
continue $sm;
|
|
924
930
|
case 4:
|
|
925
|
-
return this.
|
|
931
|
+
return this.e68_1;
|
|
926
932
|
case 5:
|
|
927
|
-
throw this.
|
|
933
|
+
throw this.i9_1;
|
|
928
934
|
}
|
|
929
935
|
} catch ($p) {
|
|
930
936
|
var e = $p;
|
|
931
|
-
if (this.
|
|
937
|
+
if (this.g9_1 === 5) {
|
|
932
938
|
throw e;
|
|
933
939
|
} else {
|
|
934
|
-
this.
|
|
935
|
-
this.
|
|
940
|
+
this.f9_1 = this.g9_1;
|
|
941
|
+
this.i9_1 = e;
|
|
936
942
|
}
|
|
937
943
|
}
|
|
938
944
|
while (true);
|
|
939
945
|
};
|
|
940
946
|
function CardsDealerProviderImpl(random, randomPoolProvider, logger) {
|
|
941
|
-
this.
|
|
942
|
-
this.
|
|
943
|
-
this.
|
|
947
|
+
this.y68_1 = random;
|
|
948
|
+
this.z68_1 = randomPoolProvider;
|
|
949
|
+
this.a69_1 = logger;
|
|
944
950
|
}
|
|
945
|
-
protoOf(CardsDealerProviderImpl).
|
|
951
|
+
protoOf(CardsDealerProviderImpl).e67 = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit) {
|
|
946
952
|
// Inline function 'kotlin.collections.flatMap' call
|
|
947
953
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
948
954
|
var this_0 = get_entries();
|
|
@@ -963,7 +969,7 @@
|
|
|
963
969
|
inductionVariable = inductionVariable + 1 | 0;
|
|
964
970
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.cards.CardsDealerProviderImpl.createNewCardDeck.<anonymous>.<anonymous>' call
|
|
965
971
|
var it = item;
|
|
966
|
-
var tmp$ret$0 = Companion_instance.
|
|
972
|
+
var tmp$ret$0 = Companion_instance.q66(element, it);
|
|
967
973
|
destination_0.e(tmp$ret$0);
|
|
968
974
|
}
|
|
969
975
|
while (!(item === last));
|
|
@@ -972,13 +978,13 @@
|
|
|
972
978
|
}
|
|
973
979
|
return destination;
|
|
974
980
|
};
|
|
975
|
-
protoOf(CardsDealerProviderImpl).
|
|
981
|
+
protoOf(CardsDealerProviderImpl).f67 = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundCountForGame, userData, provider, $completion) {
|
|
976
982
|
var tmp = new $createNewShuffledCardDeckCOROUTINE$0(this, leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundCountForGame, userData, provider, $completion);
|
|
977
|
-
tmp.
|
|
978
|
-
tmp.
|
|
979
|
-
return tmp.
|
|
983
|
+
tmp.h9_1 = Unit_instance;
|
|
984
|
+
tmp.i9_1 = null;
|
|
985
|
+
return tmp.n9();
|
|
980
986
|
};
|
|
981
|
-
protoOf(CardsDealerProviderImpl).
|
|
987
|
+
protoOf(CardsDealerProviderImpl).g67 = function (count, cards) {
|
|
982
988
|
// Inline function 'kotlin.apply' call
|
|
983
989
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
984
990
|
var this_0 = ArrayList_init_$Create$();
|
|
@@ -1012,7 +1018,7 @@
|
|
|
1012
1018
|
while (tmp0_iterator.k()) {
|
|
1013
1019
|
var element = tmp0_iterator.l();
|
|
1014
1020
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.cards.CardsDealerProviderImpl.getNRandomUniqueCards.<anonymous>.<anonymous>' call
|
|
1015
|
-
if (element.
|
|
1021
|
+
if (element.p66() === card.p66()) {
|
|
1016
1022
|
tmp$ret$2 = true;
|
|
1017
1023
|
break $l$block_1;
|
|
1018
1024
|
}
|
|
@@ -1027,7 +1033,7 @@
|
|
|
1027
1033
|
}
|
|
1028
1034
|
return this_0;
|
|
1029
1035
|
};
|
|
1030
|
-
protoOf(CardsDealerProviderImpl).
|
|
1036
|
+
protoOf(CardsDealerProviderImpl).h67 = function (cards, times) {
|
|
1031
1037
|
// Inline function 'kotlin.let' call
|
|
1032
1038
|
// Inline function 'kotlin.contracts.contract' call
|
|
1033
1039
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.cards.CardsDealerProviderImpl.standardShuffledCards.<anonymous>' call
|
|
@@ -1037,49 +1043,55 @@
|
|
|
1037
1043
|
do {
|
|
1038
1044
|
var i = inductionVariable;
|
|
1039
1045
|
inductionVariable = inductionVariable + 1 | 0;
|
|
1040
|
-
shuffled = this.
|
|
1046
|
+
shuffled = this.y68_1.l5w(shuffled);
|
|
1041
1047
|
}
|
|
1042
1048
|
while (inductionVariable < times);
|
|
1043
1049
|
return shuffled;
|
|
1044
1050
|
};
|
|
1051
|
+
protoOf(CardsDealerProviderImpl).j67 = function (cards, times) {
|
|
1052
|
+
return toList(overhand(riffle(toMutableList(cards), times, this.y68_1), times, this.y68_1));
|
|
1053
|
+
};
|
|
1045
1054
|
function Companion_3() {
|
|
1046
1055
|
}
|
|
1047
|
-
protoOf(Companion_3).
|
|
1056
|
+
protoOf(Companion_3).b69 = function () {
|
|
1048
1057
|
// Inline function 'kotlin.apply' call
|
|
1049
1058
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
1050
1059
|
var this_0 = ArrayList_init_$Create$();
|
|
1051
1060
|
// Inline function 'kotlin.contracts.contract' call
|
|
1052
1061
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.cards.Companion.getCards.<anonymous>' call
|
|
1053
|
-
this_0.n(listOf([Companion_instance.
|
|
1054
|
-
this_0.n(listOf([Companion_instance.
|
|
1055
|
-
this_0.n(listOf([Companion_instance.
|
|
1056
|
-
this_0.n(listOf([Companion_instance.
|
|
1057
|
-
this_0.n(listOf([Companion_instance.
|
|
1062
|
+
this_0.n(listOf([Companion_instance.r66(Suit_DIAMOND_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.r66(Suit_CLUB_getInstance(), CardName_NINE_getInstance()), Companion_instance.r66(Suit_CLUB_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.r66(Suit_CLUB_getInstance(), CardName_TEN_getInstance()), Companion_instance.r66(Suit_HEART_getInstance(), CardName_JACK_getInstance()), Companion_instance.r66(Suit_HEART_getInstance(), CardName_KING_getInstance())]));
|
|
1063
|
+
this_0.n(listOf([Companion_instance.r66(Suit_CLUB_getInstance(), CardName_JACK_getInstance()), Companion_instance.r66(Suit_SPADE_getInstance(), CardName_ACE_getInstance()), Companion_instance.r66(Suit_DIAMOND_getInstance(), CardName_NINE_getInstance()), Companion_instance.r66(Suit_DIAMOND_getInstance(), CardName_TEN_getInstance()), Companion_instance.r66(Suit_DIAMOND_getInstance(), CardName_JACK_getInstance()), Companion_instance.r66(Suit_HEART_getInstance(), CardName_EIGHT_getInstance())]));
|
|
1064
|
+
this_0.n(listOf([Companion_instance.r66(Suit_CLUB_getInstance(), CardName_DAME_getInstance()), Companion_instance.r66(Suit_HEART_getInstance(), CardName_ACE_getInstance()), Companion_instance.r66(Suit_HEART_getInstance(), CardName_DAME_getInstance()), Companion_instance.r66(Suit_HEART_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.r66(Suit_SPADE_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.r66(Suit_CLUB_getInstance(), CardName_KING_getInstance())]));
|
|
1065
|
+
this_0.n(listOf([Companion_instance.r66(Suit_SPADE_getInstance(), CardName_EIGHT_getInstance()), Companion_instance.r66(Suit_SPADE_getInstance(), CardName_TEN_getInstance()), Companion_instance.r66(Suit_HEART_getInstance(), CardName_TEN_getInstance()), Companion_instance.r66(Suit_SPADE_getInstance(), CardName_JACK_getInstance()), Companion_instance.r66(Suit_DIAMOND_getInstance(), CardName_EIGHT_getInstance()), Companion_instance.r66(Suit_SPADE_getInstance(), CardName_DAME_getInstance())]));
|
|
1066
|
+
this_0.n(listOf([Companion_instance.r66(Suit_DIAMOND_getInstance(), CardName_ACE_getInstance()), Companion_instance.r66(Suit_CLUB_getInstance(), CardName_EIGHT_getInstance()), Companion_instance.r66(Suit_DIAMOND_getInstance(), CardName_KING_getInstance()), Companion_instance.r66(Suit_SPADE_getInstance(), CardName_NINE_getInstance()), Companion_instance.r66(Suit_CLUB_getInstance(), CardName_ACE_getInstance()), Companion_instance.r66(Suit_SPADE_getInstance(), CardName_KING_getInstance()), Companion_instance.r66(Suit_DIAMOND_getInstance(), CardName_DAME_getInstance()), Companion_instance.r66(Suit_HEART_getInstance(), CardName_NINE_getInstance())]));
|
|
1058
1067
|
return this_0;
|
|
1059
1068
|
};
|
|
1060
|
-
protoOf(Companion_3).
|
|
1061
|
-
return listOf([Companion_instance.
|
|
1069
|
+
protoOf(Companion_3).c69 = function () {
|
|
1070
|
+
return listOf([Companion_instance.r66(Suit_CLUB_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.r66(Suit_HEART_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.r66(Suit_SPADE_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.r66(Suit_SPADE_getInstance(), CardName_EIGHT_getInstance())]);
|
|
1062
1071
|
};
|
|
1063
1072
|
var Companion_instance_3;
|
|
1064
1073
|
function Companion_getInstance_3() {
|
|
1065
1074
|
return Companion_instance_3;
|
|
1066
1075
|
}
|
|
1067
1076
|
function FakeCardsDealerProvider(cards, cardsForLot) {
|
|
1068
|
-
cards = cards === VOID ? Companion_instance_3.
|
|
1069
|
-
cardsForLot = cardsForLot === VOID ? Companion_instance_3.
|
|
1070
|
-
this.
|
|
1071
|
-
this.
|
|
1077
|
+
cards = cards === VOID ? Companion_instance_3.b69() : cards;
|
|
1078
|
+
cardsForLot = cardsForLot === VOID ? Companion_instance_3.c69() : cardsForLot;
|
|
1079
|
+
this.d69_1 = cards;
|
|
1080
|
+
this.e69_1 = cardsForLot;
|
|
1072
1081
|
}
|
|
1073
|
-
protoOf(FakeCardsDealerProvider).
|
|
1074
|
-
return this.
|
|
1082
|
+
protoOf(FakeCardsDealerProvider).e67 = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit) {
|
|
1083
|
+
return this.d69_1;
|
|
1075
1084
|
};
|
|
1076
|
-
protoOf(FakeCardsDealerProvider).
|
|
1077
|
-
return this.
|
|
1085
|
+
protoOf(FakeCardsDealerProvider).f67 = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundCountForGame, userData, provider, $completion) {
|
|
1086
|
+
return this.d69_1;
|
|
1078
1087
|
};
|
|
1079
|
-
protoOf(FakeCardsDealerProvider).
|
|
1080
|
-
return this.
|
|
1088
|
+
protoOf(FakeCardsDealerProvider).g67 = function (count, cards) {
|
|
1089
|
+
return this.e69_1;
|
|
1090
|
+
};
|
|
1091
|
+
protoOf(FakeCardsDealerProvider).h67 = function (cards, times) {
|
|
1092
|
+
return cards;
|
|
1081
1093
|
};
|
|
1082
|
-
protoOf(FakeCardsDealerProvider).
|
|
1094
|
+
protoOf(FakeCardsDealerProvider).j67 = function (cards, times) {
|
|
1083
1095
|
return cards;
|
|
1084
1096
|
};
|
|
1085
1097
|
function CombinationsCheckerProvider() {
|
|
@@ -1108,23 +1120,23 @@
|
|
|
1108
1120
|
return takeLast(cards, longestCombinationSupport);
|
|
1109
1121
|
}
|
|
1110
1122
|
function sam$kotlin_Comparator$0(function_0) {
|
|
1111
|
-
this.
|
|
1123
|
+
this.k69_1 = function_0;
|
|
1112
1124
|
}
|
|
1113
|
-
protoOf(sam$kotlin_Comparator$0).
|
|
1114
|
-
return this.
|
|
1125
|
+
protoOf(sam$kotlin_Comparator$0).nc = function (a, b) {
|
|
1126
|
+
return this.k69_1(a, b);
|
|
1115
1127
|
};
|
|
1116
1128
|
protoOf(sam$kotlin_Comparator$0).compare = function (a, b) {
|
|
1117
|
-
return this.
|
|
1129
|
+
return this.nc(a, b);
|
|
1118
1130
|
};
|
|
1119
|
-
protoOf(sam$kotlin_Comparator$0).
|
|
1120
|
-
return this.
|
|
1131
|
+
protoOf(sam$kotlin_Comparator$0).p3 = function () {
|
|
1132
|
+
return this.k69_1;
|
|
1121
1133
|
};
|
|
1122
1134
|
protoOf(sam$kotlin_Comparator$0).equals = function (other) {
|
|
1123
1135
|
var tmp;
|
|
1124
1136
|
if (!(other == null) ? isInterface(other, Comparator) : false) {
|
|
1125
1137
|
var tmp_0;
|
|
1126
1138
|
if (!(other == null) ? isInterface(other, FunctionAdapter) : false) {
|
|
1127
|
-
tmp_0 = equals(this.
|
|
1139
|
+
tmp_0 = equals(this.p3(), other.p3());
|
|
1128
1140
|
} else {
|
|
1129
1141
|
tmp_0 = false;
|
|
1130
1142
|
}
|
|
@@ -1135,19 +1147,19 @@
|
|
|
1135
1147
|
return tmp;
|
|
1136
1148
|
};
|
|
1137
1149
|
protoOf(sam$kotlin_Comparator$0).hashCode = function () {
|
|
1138
|
-
return hashCode(this.
|
|
1150
|
+
return hashCode(this.p3());
|
|
1139
1151
|
};
|
|
1140
1152
|
function CombinationsCheckerProviderImpl$createCombinationsFromCardsInRow$lambda(a, b) {
|
|
1141
1153
|
// Inline function 'kotlin.comparisons.compareValuesBy' call
|
|
1142
1154
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.combinations.CombinationsCheckerProviderImpl.createCombinationsFromCardsInRow.<anonymous>' call
|
|
1143
|
-
var tmp = first_0(a).
|
|
1155
|
+
var tmp = first_0(a).o66_1;
|
|
1144
1156
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.combinations.CombinationsCheckerProviderImpl.createCombinationsFromCardsInRow.<anonymous>' call
|
|
1145
|
-
var tmp$ret$1 = first_0(b).
|
|
1157
|
+
var tmp$ret$1 = first_0(b).o66_1;
|
|
1146
1158
|
return compareValues(tmp, tmp$ret$1);
|
|
1147
1159
|
}
|
|
1148
1160
|
function CombinationsCheckerProviderImpl() {
|
|
1149
1161
|
}
|
|
1150
|
-
protoOf(CombinationsCheckerProviderImpl).
|
|
1162
|
+
protoOf(CombinationsCheckerProviderImpl).f69 = function (cards, supportedCombinations, checkFromIndex, includeCardNames, suit) {
|
|
1151
1163
|
// Inline function 'kotlin.collections.filter' call
|
|
1152
1164
|
// Inline function 'kotlin.apply' call
|
|
1153
1165
|
var this_0 = toMutableList(cards);
|
|
@@ -1160,7 +1172,7 @@
|
|
|
1160
1172
|
while (tmp0_iterator.k()) {
|
|
1161
1173
|
var element = tmp0_iterator.l();
|
|
1162
1174
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.combinations.CombinationsCheckerProviderImpl.findCardsInRowCombinations.<anonymous>' call
|
|
1163
|
-
if (element.
|
|
1175
|
+
if (element.c67()) {
|
|
1164
1176
|
destination.e(element);
|
|
1165
1177
|
}
|
|
1166
1178
|
}
|
|
@@ -1177,14 +1189,14 @@
|
|
|
1177
1189
|
inductionVariable = inductionVariable + 1 | 0;
|
|
1178
1190
|
var previousCard = lastOrNull(combinationCards);
|
|
1179
1191
|
var currentCard = sortedByIndexCards.o(i);
|
|
1180
|
-
var isNextInRow = !(previousCard == null) && currentCard.
|
|
1181
|
-
var passedCardNamesCheck = includeCardNames == null || includeCardNames.s1(currentCard.
|
|
1182
|
-
var passedSuitCheck = suit == null || currentCard.
|
|
1192
|
+
var isNextInRow = !(previousCard == null) && currentCard.o66_1 === (previousCard.o66_1 + 1 | 0) && currentCard.b67().equals(previousCard.b67());
|
|
1193
|
+
var passedCardNamesCheck = includeCardNames == null || includeCardNames.s1(currentCard.p2());
|
|
1194
|
+
var passedSuitCheck = suit == null || currentCard.b67().equals(suit);
|
|
1183
1195
|
if (isNextInRow && passedSuitCheck && passedCardNamesCheck) {
|
|
1184
1196
|
combinationCards.e(currentCard);
|
|
1185
1197
|
} else {
|
|
1186
1198
|
if (combinationCards.m() > (checkFromIndex - 1 | 0)) {
|
|
1187
|
-
combinations.n(this.
|
|
1199
|
+
combinations.n(this.j69(toMutableList(combinationCards), supportedCombinations));
|
|
1188
1200
|
}
|
|
1189
1201
|
combinationCards.a2();
|
|
1190
1202
|
if (passedSuitCheck && passedCardNamesCheck) {
|
|
@@ -1194,11 +1206,11 @@
|
|
|
1194
1206
|
}
|
|
1195
1207
|
while (inductionVariable <= last);
|
|
1196
1208
|
if (combinationCards.m() > (checkFromIndex - 1 | 0)) {
|
|
1197
|
-
combinations.n(this.
|
|
1209
|
+
combinations.n(this.j69(toMutableList(combinationCards), supportedCombinations));
|
|
1198
1210
|
}
|
|
1199
1211
|
return combinations;
|
|
1200
1212
|
};
|
|
1201
|
-
protoOf(CombinationsCheckerProviderImpl).
|
|
1213
|
+
protoOf(CombinationsCheckerProviderImpl).h69 = function (cards, cardsCount, includeCardNames) {
|
|
1202
1214
|
// Inline function 'kotlin.collections.filter' call
|
|
1203
1215
|
// Inline function 'kotlin.collections.filter' call
|
|
1204
1216
|
// Inline function 'kotlin.apply' call
|
|
@@ -1212,7 +1224,7 @@
|
|
|
1212
1224
|
while (tmp0_iterator.k()) {
|
|
1213
1225
|
var element = tmp0_iterator.l();
|
|
1214
1226
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.combinations.CombinationsCheckerProviderImpl.findSameCardsNumberCombinations.<anonymous>' call
|
|
1215
|
-
if (element.
|
|
1227
|
+
if (element.c67()) {
|
|
1216
1228
|
destination.e(element);
|
|
1217
1229
|
}
|
|
1218
1230
|
}
|
|
@@ -1222,7 +1234,7 @@
|
|
|
1222
1234
|
while (tmp0_iterator_0.k()) {
|
|
1223
1235
|
var element_0 = tmp0_iterator_0.l();
|
|
1224
1236
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.combinations.CombinationsCheckerProviderImpl.findSameCardsNumberCombinations.<anonymous>' call
|
|
1225
|
-
if (includeCardNames == null || includeCardNames.s1(element_0.
|
|
1237
|
+
if (includeCardNames == null || includeCardNames.s1(element_0.p2())) {
|
|
1226
1238
|
destination_0.e(element_0);
|
|
1227
1239
|
}
|
|
1228
1240
|
}
|
|
@@ -1235,14 +1247,14 @@
|
|
|
1235
1247
|
while (tmp0_iterator_1.k()) {
|
|
1236
1248
|
var element_1 = tmp0_iterator_1.l();
|
|
1237
1249
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.combinations.CombinationsCheckerProviderImpl.findSameCardsNumberCombinations.<anonymous>' call
|
|
1238
|
-
var key = element_1.
|
|
1250
|
+
var key = element_1.p66();
|
|
1239
1251
|
// Inline function 'kotlin.collections.getOrPut' call
|
|
1240
|
-
var value = destination_1.
|
|
1252
|
+
var value = destination_1.h2(key);
|
|
1241
1253
|
var tmp;
|
|
1242
1254
|
if (value == null) {
|
|
1243
1255
|
// Inline function 'kotlin.collections.groupByTo.<anonymous>' call
|
|
1244
1256
|
var answer = ArrayList_init_$Create$();
|
|
1245
|
-
destination_1.
|
|
1257
|
+
destination_1.k2(key, answer);
|
|
1246
1258
|
tmp = answer;
|
|
1247
1259
|
} else {
|
|
1248
1260
|
tmp = value;
|
|
@@ -1258,10 +1270,10 @@
|
|
|
1258
1270
|
var element_2 = tmp0_iterator_2.l();
|
|
1259
1271
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.combinations.CombinationsCheckerProviderImpl.findSameCardsNumberCombinations.<anonymous>' call
|
|
1260
1272
|
if (element_2.u().m() >= cardsCount) {
|
|
1261
|
-
destination_2.
|
|
1273
|
+
destination_2.k2(element_2.t(), element_2.u());
|
|
1262
1274
|
}
|
|
1263
1275
|
}
|
|
1264
|
-
var combinations = destination_2.
|
|
1276
|
+
var combinations = destination_2.j2();
|
|
1265
1277
|
// Inline function 'kotlin.collections.map' call
|
|
1266
1278
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1267
1279
|
var destination_3 = ArrayList_init_$Create$_0(collectionSizeOrDefault(combinations, 10));
|
|
@@ -1274,7 +1286,7 @@
|
|
|
1274
1286
|
}
|
|
1275
1287
|
return destination_3;
|
|
1276
1288
|
};
|
|
1277
|
-
protoOf(CombinationsCheckerProviderImpl).
|
|
1289
|
+
protoOf(CombinationsCheckerProviderImpl).j69 = function (cards, supportedCombinations) {
|
|
1278
1290
|
// Inline function 'kotlin.collections.minOf' call
|
|
1279
1291
|
var iterator = supportedCombinations.j();
|
|
1280
1292
|
if (!iterator.k())
|
|
@@ -1304,28 +1316,28 @@
|
|
|
1304
1316
|
return sortedWith(combinations, tmp$ret$4);
|
|
1305
1317
|
};
|
|
1306
1318
|
function DealerReducerImpl(logger, enableLogs) {
|
|
1307
|
-
this.
|
|
1308
|
-
this.
|
|
1319
|
+
this.l69_1 = logger;
|
|
1320
|
+
this.m69_1 = enableLogs;
|
|
1309
1321
|
}
|
|
1310
|
-
protoOf(DealerReducerImpl).
|
|
1322
|
+
protoOf(DealerReducerImpl).n69 = function (cards, cardsToRemove) {
|
|
1311
1323
|
var list = cards;
|
|
1312
1324
|
var _iterator__ex2g4s = cardsToRemove.j();
|
|
1313
1325
|
while (_iterator__ex2g4s.k()) {
|
|
1314
1326
|
var gameCard = _iterator__ex2g4s.l();
|
|
1315
|
-
list = this.
|
|
1327
|
+
list = this.o69(list, gameCard);
|
|
1316
1328
|
}
|
|
1317
1329
|
return list;
|
|
1318
1330
|
};
|
|
1319
|
-
protoOf(DealerReducerImpl).
|
|
1331
|
+
protoOf(DealerReducerImpl).o69 = function (cards, cardToRemove) {
|
|
1320
1332
|
var tmp;
|
|
1321
|
-
if (!cardToRemove.
|
|
1322
|
-
if (this.
|
|
1323
|
-
this.
|
|
1333
|
+
if (!cardToRemove.u66() && cards.s1(cardToRemove)) {
|
|
1334
|
+
if (this.m69_1) {
|
|
1335
|
+
this.l69_1.d('Dealer', 'Card removed: ' + cardToRemove.toString() + ', size: ' + (cards.m() - 1 | 0));
|
|
1324
1336
|
}
|
|
1325
1337
|
tmp = minus(cards, cardToRemove);
|
|
1326
1338
|
} else {
|
|
1327
|
-
if (this.
|
|
1328
|
-
this.
|
|
1339
|
+
if (this.m69_1) {
|
|
1340
|
+
this.l69_1.d('Dealer', 'Card removed as stub: ' + cardToRemove.toString() + ', size: ' + (cards.m() - 1 | 0));
|
|
1329
1341
|
}
|
|
1330
1342
|
// Inline function 'kotlin.collections.filterNot' call
|
|
1331
1343
|
// Inline function 'kotlin.collections.filterNotTo' call
|
|
@@ -1334,7 +1346,7 @@
|
|
|
1334
1346
|
while (tmp0_iterator.k()) {
|
|
1335
1347
|
var element = tmp0_iterator.l();
|
|
1336
1348
|
// Inline function 'io.raspberryapps.card_game.core.domain.dealer.DealerReducerImpl.removeCard.<anonymous>' call
|
|
1337
|
-
if (!element.
|
|
1349
|
+
if (!element.u66()) {
|
|
1338
1350
|
destination.e(element);
|
|
1339
1351
|
}
|
|
1340
1352
|
}
|
|
@@ -1346,34 +1358,36 @@
|
|
|
1346
1358
|
while (tmp0_iterator_0.k()) {
|
|
1347
1359
|
var element_0 = tmp0_iterator_0.l();
|
|
1348
1360
|
// Inline function 'io.raspberryapps.card_game.core.domain.dealer.DealerReducerImpl.removeCard.<anonymous>' call
|
|
1349
|
-
if (element_0.
|
|
1361
|
+
if (element_0.u66()) {
|
|
1350
1362
|
destination_0.e(element_0);
|
|
1351
1363
|
}
|
|
1352
1364
|
}
|
|
1353
1365
|
var stubCards = destination_0;
|
|
1354
1366
|
if (stubCards.p()) {
|
|
1355
|
-
this.
|
|
1367
|
+
this.l69_1.w('Dealer', "Can't find card to delete for player, " + ('cards:' + toString(cards) + ', ') + ('cardToRemove: ' + cardToRemove.toString()));
|
|
1356
1368
|
}
|
|
1357
1369
|
tmp = plus(notStubCards, dropLast(stubCards, 1));
|
|
1358
1370
|
}
|
|
1359
1371
|
return tmp;
|
|
1360
1372
|
};
|
|
1361
|
-
protoOf(DealerReducerImpl).
|
|
1362
|
-
if (this.
|
|
1363
|
-
this.
|
|
1373
|
+
protoOf(DealerReducerImpl).p69 = function (cards, cardToAdd) {
|
|
1374
|
+
if (this.m69_1) {
|
|
1375
|
+
this.l69_1.d('Dealer', 'Card added: ' + cardToAdd.toString() + ', size: ' + (cards.m() + 1 | 0));
|
|
1364
1376
|
}
|
|
1365
1377
|
if (cards.s1(cardToAdd)) {
|
|
1366
|
-
this.
|
|
1378
|
+
this.l69_1.w('Dealer', 'Card already exists for player, ' + ('cards:' + toString(cards) + ', ') + ('cardToAdd: ' + cardToAdd.toString()));
|
|
1367
1379
|
}
|
|
1368
1380
|
return plus_0(cards, cardToAdd);
|
|
1369
1381
|
};
|
|
1370
1382
|
function DealerReducer() {
|
|
1371
1383
|
}
|
|
1372
1384
|
//region block: post-declaration
|
|
1373
|
-
protoOf(CardsDealerProviderImpl).
|
|
1374
|
-
protoOf(
|
|
1375
|
-
protoOf(
|
|
1376
|
-
protoOf(
|
|
1385
|
+
protoOf(CardsDealerProviderImpl).i67 = standardShuffledCards$default;
|
|
1386
|
+
protoOf(CardsDealerProviderImpl).k67 = realLifeShuffledCards$default;
|
|
1387
|
+
protoOf(FakeCardsDealerProvider).i67 = standardShuffledCards$default;
|
|
1388
|
+
protoOf(FakeCardsDealerProvider).k67 = realLifeShuffledCards$default;
|
|
1389
|
+
protoOf(CombinationsCheckerProviderImpl).g69 = findCardsInRowCombinations$default;
|
|
1390
|
+
protoOf(CombinationsCheckerProviderImpl).i69 = findSameCardsNumberCombinations$default;
|
|
1377
1391
|
//endregion
|
|
1378
1392
|
//region block: init
|
|
1379
1393
|
CoreConfig_instance = new CoreConfig();
|