raspberry_games_server_game_logic 1.8.301 → 1.8.302
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 +56 -56
- package/Kosi-Kodein-kodein-di.js +504 -504
- package/Kotlin-DateTime-library-kotlinx-datetime.js +2 -2
- package/Logic_Debertz-core.js +1041 -1041
- package/Logic_Debertz-engine.js +10901 -10901
- package/Logic_Debertz-game_server.js +877 -867
- package/Logic_Debertz-game_server.js.map +1 -1
- package/kotlin-kotlin-stdlib.js +4 -4
- package/kotlinx-coroutines-core.js +9 -9
- package/kotlinx-coroutines-core.js.map +1 -1
- package/kotlinx-io-kotlinx-io-core.js +304 -304
- package/package.json +1 -1
- package/raspberry-cardgame-lib-core.js +166 -165
- package/raspberry-cardgame-lib-core.js.map +1 -1
- package/raspberry-cardgame-lib-random.js +70 -67
- package/raspberry-cardgame-lib-random.js.map +1 -1
|
@@ -95,11 +95,11 @@
|
|
|
95
95
|
initMetadataForClass(CardsRandomProvider, 'CardsRandomProvider', VOID, Enum);
|
|
96
96
|
function standardShuffledCards$default(cards, times, $super) {
|
|
97
97
|
times = times === VOID ? 3 : times;
|
|
98
|
-
return $super === VOID ? this.
|
|
98
|
+
return $super === VOID ? this.j67(cards, times) : $super.j67.call(this, cards, times);
|
|
99
99
|
}
|
|
100
100
|
function realLifeShuffledCards$default(cards, times, $super) {
|
|
101
101
|
times = times === VOID ? 20 : times;
|
|
102
|
-
return $super === VOID ? this.
|
|
102
|
+
return $super === VOID ? this.l67(cards, times) : $super.l67.call(this, cards, times);
|
|
103
103
|
}
|
|
104
104
|
initMetadataForInterface(CardsDealerProvider, 'CardsDealerProvider', VOID, VOID, VOID, [5]);
|
|
105
105
|
initMetadataForCompanion(Companion_2);
|
|
@@ -112,12 +112,12 @@
|
|
|
112
112
|
checkFromIndex = checkFromIndex === VOID ? first(supportedCombinations) : checkFromIndex;
|
|
113
113
|
includeCardNames = includeCardNames === VOID ? null : includeCardNames;
|
|
114
114
|
suit = suit === VOID ? null : suit;
|
|
115
|
-
return $super === VOID ? this.
|
|
115
|
+
return $super === VOID ? this.h69(cards, supportedCombinations, checkFromIndex, includeCardNames, suit) : $super.h69.call(this, cards, supportedCombinations, checkFromIndex, includeCardNames, suit);
|
|
116
116
|
}
|
|
117
117
|
function findSameCardsNumberCombinations$default(cards, cardsCount, includeCardNames, $super) {
|
|
118
118
|
cardsCount = cardsCount === VOID ? 4 : cardsCount;
|
|
119
119
|
includeCardNames = includeCardNames === VOID ? null : includeCardNames;
|
|
120
|
-
return $super === VOID ? this.
|
|
120
|
+
return $super === VOID ? this.j69(cards, cardsCount, includeCardNames) : $super.j69.call(this, cards, cardsCount, includeCardNames);
|
|
121
121
|
}
|
|
122
122
|
initMetadataForInterface(CombinationsCheckerProvider, 'CombinationsCheckerProvider');
|
|
123
123
|
initMetadataForClass(sam$kotlin_Comparator$0, 'sam$kotlin_Comparator$0', VOID, VOID, [Comparator, FunctionAdapter]);
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
initMetadataForClass(DealerReducerImpl, 'DealerReducerImpl', VOID, VOID, [DealerReducer]);
|
|
127
127
|
//endregion
|
|
128
128
|
function CoreConfig() {
|
|
129
|
-
this.version = '0.0.
|
|
129
|
+
this.version = '0.0.40';
|
|
130
130
|
}
|
|
131
131
|
protoOf(CoreConfig).r2z = function () {
|
|
132
132
|
return this.version;
|
|
@@ -137,12 +137,12 @@
|
|
|
137
137
|
}
|
|
138
138
|
function CardIndexComparator() {
|
|
139
139
|
}
|
|
140
|
-
protoOf(CardIndexComparator).
|
|
141
|
-
return a.
|
|
140
|
+
protoOf(CardIndexComparator).o66 = function (a, b) {
|
|
141
|
+
return a.p66_1 - b.p66_1 | 0;
|
|
142
142
|
};
|
|
143
143
|
protoOf(CardIndexComparator).compare = function (a, b) {
|
|
144
144
|
var tmp = a instanceof GameCard ? a : THROW_CCE();
|
|
145
|
-
return this.
|
|
145
|
+
return this.o66(tmp, b instanceof GameCard ? b : THROW_CCE());
|
|
146
146
|
};
|
|
147
147
|
var CardIndexComparator_instance;
|
|
148
148
|
function CardIndexComparator_getInstance() {
|
|
@@ -150,12 +150,12 @@
|
|
|
150
150
|
}
|
|
151
151
|
function CardNumberComparator() {
|
|
152
152
|
}
|
|
153
|
-
protoOf(CardNumberComparator).
|
|
154
|
-
return b.
|
|
153
|
+
protoOf(CardNumberComparator).o66 = function (a, b) {
|
|
154
|
+
return b.q66() - a.q66() | 0;
|
|
155
155
|
};
|
|
156
156
|
protoOf(CardNumberComparator).compare = function (a, b) {
|
|
157
157
|
var tmp = a instanceof GameCard ? a : THROW_CCE();
|
|
158
|
-
return this.
|
|
158
|
+
return this.o66(tmp, b instanceof GameCard ? b : THROW_CCE());
|
|
159
159
|
};
|
|
160
160
|
var CardNumberComparator_instance;
|
|
161
161
|
function CardNumberComparator_getInstance() {
|
|
@@ -297,16 +297,16 @@
|
|
|
297
297
|
}
|
|
298
298
|
function Companion() {
|
|
299
299
|
}
|
|
300
|
-
protoOf(Companion).
|
|
300
|
+
protoOf(Companion).r66 = function (suit, number) {
|
|
301
301
|
return new GameCard(getNumber(Companion_instance_0, getName(Companion_instance_0, number), suit));
|
|
302
302
|
};
|
|
303
|
-
protoOf(Companion).
|
|
303
|
+
protoOf(Companion).s66 = function (suit, cardNumber) {
|
|
304
304
|
return new GameCard(getNumber(Companion_instance_0, cardNumber, suit));
|
|
305
305
|
};
|
|
306
|
-
protoOf(Companion).
|
|
306
|
+
protoOf(Companion).t66 = function (index) {
|
|
307
307
|
return new GameCard(index);
|
|
308
308
|
};
|
|
309
|
-
protoOf(Companion).
|
|
309
|
+
protoOf(Companion).u66 = function (position, playerIndex, previousStubCardWithMaxIndex, reverse) {
|
|
310
310
|
var tmp;
|
|
311
311
|
if (previousStubCardWithMaxIndex == null) {
|
|
312
312
|
tmp = null;
|
|
@@ -315,7 +315,7 @@
|
|
|
315
315
|
// Inline function 'kotlin.contracts.contract' call
|
|
316
316
|
var tmp_0;
|
|
317
317
|
// Inline function 'io.raspberryapps.card_game.core.data.models.cards.Companion.createUniqueStub.<anonymous>' call
|
|
318
|
-
if (previousStubCardWithMaxIndex.
|
|
318
|
+
if (previousStubCardWithMaxIndex.v66()) {
|
|
319
319
|
tmp_0 = previousStubCardWithMaxIndex;
|
|
320
320
|
} else {
|
|
321
321
|
tmp_0 = null;
|
|
@@ -323,8 +323,8 @@
|
|
|
323
323
|
tmp = tmp_0;
|
|
324
324
|
}
|
|
325
325
|
var tmp3_safe_receiver = tmp;
|
|
326
|
-
var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.
|
|
327
|
-
var tmp5_safe_receiver = tmp4_safe_receiver == null ? null : Companion_instance_0.
|
|
326
|
+
var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.p66_1;
|
|
327
|
+
var tmp5_safe_receiver = tmp4_safe_receiver == null ? null : Companion_instance_0.b67(tmp4_safe_receiver, playerIndex, reverse);
|
|
328
328
|
var tmp_1;
|
|
329
329
|
if (tmp5_safe_receiver == null) {
|
|
330
330
|
tmp_1 = null;
|
|
@@ -335,20 +335,20 @@
|
|
|
335
335
|
tmp_1 = tmp5_safe_receiver + 1 | 0;
|
|
336
336
|
}
|
|
337
337
|
var tmp0_elvis_lhs = tmp_1;
|
|
338
|
-
var
|
|
338
|
+
var previousGameCardPosition = tmp0_elvis_lhs == null ? 0 : tmp0_elvis_lhs;
|
|
339
339
|
var tmp_2;
|
|
340
340
|
if (reverse) {
|
|
341
|
-
tmp_2 = ((53 + imul(playerIndex, 14) | 0) - position | 0) -
|
|
341
|
+
tmp_2 = ((53 + imul(playerIndex, 14) | 0) - position | 0) - previousGameCardPosition | 0;
|
|
342
342
|
} else {
|
|
343
|
-
tmp_2 = ((53 + imul(playerIndex, 13) | 0) + position | 0) +
|
|
343
|
+
tmp_2 = ((53 + imul(playerIndex, 13) | 0) + position | 0) + previousGameCardPosition | 0;
|
|
344
344
|
}
|
|
345
345
|
var index = tmp_2;
|
|
346
346
|
return new GameCard(index);
|
|
347
347
|
};
|
|
348
|
-
protoOf(Companion).
|
|
348
|
+
protoOf(Companion).c67 = function (position, playerIndex, previousStubCardWithMaxIndex, reverse, $super) {
|
|
349
349
|
previousStubCardWithMaxIndex = previousStubCardWithMaxIndex === VOID ? null : previousStubCardWithMaxIndex;
|
|
350
350
|
reverse = reverse === VOID ? false : reverse;
|
|
351
|
-
return $super === VOID ? this.
|
|
351
|
+
return $super === VOID ? this.u66(position, playerIndex, previousStubCardWithMaxIndex, reverse) : $super.u66.call(this, position, playerIndex, previousStubCardWithMaxIndex, reverse);
|
|
352
352
|
};
|
|
353
353
|
var Companion_instance;
|
|
354
354
|
function Companion_getInstance() {
|
|
@@ -452,7 +452,7 @@
|
|
|
452
452
|
return tmp;
|
|
453
453
|
}
|
|
454
454
|
function _get_isShirt__vd98rp($this) {
|
|
455
|
-
return $this.
|
|
455
|
+
return $this.p66_1 >= 150 && $this.p66_1 <= 202;
|
|
456
456
|
}
|
|
457
457
|
function CardName(name, ordinal) {
|
|
458
458
|
Enum.call(this, name, ordinal);
|
|
@@ -461,12 +461,13 @@
|
|
|
461
461
|
return getShortName(this);
|
|
462
462
|
};
|
|
463
463
|
function Companion_0() {
|
|
464
|
-
this.
|
|
465
|
-
this.
|
|
466
|
-
this.
|
|
467
|
-
this.
|
|
464
|
+
this.w66_1 = -1;
|
|
465
|
+
this.x66_1 = 13;
|
|
466
|
+
this.y66_1 = 52;
|
|
467
|
+
this.z66_1 = 150;
|
|
468
|
+
this.a67_1 = 53;
|
|
468
469
|
}
|
|
469
|
-
protoOf(Companion_0).
|
|
470
|
+
protoOf(Companion_0).b67 = function (_this__u8e3s4, playerIndex, reverse) {
|
|
470
471
|
var tmp;
|
|
471
472
|
if (reverse) {
|
|
472
473
|
tmp = _this__u8e3s4 + (53 + imul(playerIndex, 14) | 0) | 0;
|
|
@@ -536,59 +537,59 @@
|
|
|
536
537
|
return CardName_STUB_instance;
|
|
537
538
|
}
|
|
538
539
|
function GameCard(index) {
|
|
539
|
-
this.
|
|
540
|
+
this.p66_1 = index;
|
|
540
541
|
}
|
|
541
|
-
protoOf(GameCard).
|
|
542
|
+
protoOf(GameCard).d67 = function () {
|
|
542
543
|
var tmp;
|
|
543
|
-
var containsArg = this.
|
|
544
|
+
var containsArg = this.p66_1;
|
|
544
545
|
if (0 <= containsArg ? containsArg <= 13 : false) {
|
|
545
546
|
tmp = Suit_DIAMOND_getInstance();
|
|
546
547
|
} else {
|
|
547
|
-
if (this.
|
|
548
|
+
if (this.p66_1 <= 26) {
|
|
548
549
|
tmp = Suit_SPADE_getInstance();
|
|
549
550
|
} else {
|
|
550
|
-
if (this.
|
|
551
|
+
if (this.p66_1 <= 39) {
|
|
551
552
|
tmp = Suit_HEART_getInstance();
|
|
552
553
|
} else {
|
|
553
|
-
if (this.
|
|
554
|
+
if (this.p66_1 <= 52) {
|
|
554
555
|
tmp = Suit_CLUB_getInstance();
|
|
555
556
|
} else {
|
|
556
|
-
throw IllegalStateException_init_$Create$('Invalid suitCard in Card.getValue() ' + this.
|
|
557
|
+
throw IllegalStateException_init_$Create$('Invalid suitCard in Card.getValue() ' + this.p66_1);
|
|
557
558
|
}
|
|
558
559
|
}
|
|
559
560
|
}
|
|
560
561
|
}
|
|
561
562
|
return tmp;
|
|
562
563
|
};
|
|
563
|
-
protoOf(GameCard).
|
|
564
|
+
protoOf(GameCard).q66 = function () {
|
|
564
565
|
var tmp;
|
|
565
|
-
if (this.
|
|
566
|
+
if (this.v66()) {
|
|
566
567
|
tmp = -1;
|
|
567
568
|
} else {
|
|
568
|
-
tmp = this.
|
|
569
|
+
tmp = this.p66_1 - imul(13, getIndex(this.d67())) | 0;
|
|
569
570
|
}
|
|
570
571
|
return tmp;
|
|
571
572
|
};
|
|
572
573
|
protoOf(GameCard).p2 = function () {
|
|
573
|
-
return this.
|
|
574
|
+
return this.v66() ? CardName_STUB_getInstance() : getName(Companion_instance_0, this.q66());
|
|
574
575
|
};
|
|
575
|
-
protoOf(GameCard).
|
|
576
|
-
return !_get_isShirt__vd98rp(this) && !this.
|
|
576
|
+
protoOf(GameCard).e67 = function () {
|
|
577
|
+
return !_get_isShirt__vd98rp(this) && !this.v66();
|
|
577
578
|
};
|
|
578
|
-
protoOf(GameCard).
|
|
579
|
-
return this.
|
|
579
|
+
protoOf(GameCard).v66 = function () {
|
|
580
|
+
return this.p66_1 >= 53 && this.p66_1 <= 105;
|
|
580
581
|
};
|
|
581
582
|
protoOf(GameCard).toString = function () {
|
|
582
583
|
if (_get_isShirt__vd98rp(this)) {
|
|
583
584
|
return 'GameCard(SHIRT)';
|
|
584
585
|
}
|
|
585
|
-
if (this.
|
|
586
|
-
return 'GameCard(STUB, ' + this.
|
|
586
|
+
if (this.v66()) {
|
|
587
|
+
return 'GameCard(STUB, ' + this.p66_1 + ')';
|
|
587
588
|
}
|
|
588
|
-
return 'GameCard(' + this.
|
|
589
|
+
return 'GameCard(' + this.d67().toString() + this.p2().toString() + ', ' + this.p66_1 + ')';
|
|
589
590
|
};
|
|
590
591
|
protoOf(GameCard).hashCode = function () {
|
|
591
|
-
return this.
|
|
592
|
+
return this.p66_1;
|
|
592
593
|
};
|
|
593
594
|
protoOf(GameCard).equals = function (other) {
|
|
594
595
|
if (this === other)
|
|
@@ -596,12 +597,12 @@
|
|
|
596
597
|
if (!(other instanceof GameCard))
|
|
597
598
|
return false;
|
|
598
599
|
var tmp0_other_with_cast = other instanceof GameCard ? other : THROW_CCE();
|
|
599
|
-
if (!(this.
|
|
600
|
+
if (!(this.p66_1 === tmp0_other_with_cast.p66_1))
|
|
600
601
|
return false;
|
|
601
602
|
return true;
|
|
602
603
|
};
|
|
603
604
|
function _get_$cachedSerializer__te6jhj($this) {
|
|
604
|
-
return $this.
|
|
605
|
+
return $this.f67_1.u();
|
|
605
606
|
}
|
|
606
607
|
function Suit$Companion$_anonymous__cbm2iq() {
|
|
607
608
|
return createSimpleEnumSerializer('io.raspberryapps.card_game.core.data.models.cards.Suit', values());
|
|
@@ -643,7 +644,7 @@
|
|
|
643
644
|
Companion_instance_1 = this;
|
|
644
645
|
var tmp = this;
|
|
645
646
|
var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
646
|
-
tmp.
|
|
647
|
+
tmp.f67_1 = lazy(tmp_0, Suit$Companion$_anonymous__cbm2iq);
|
|
647
648
|
}
|
|
648
649
|
protoOf(Companion_1).a4x = function () {
|
|
649
650
|
return _get_$cachedSerializer__te6jhj(this);
|
|
@@ -770,7 +771,7 @@
|
|
|
770
771
|
}
|
|
771
772
|
function Companion_2() {
|
|
772
773
|
}
|
|
773
|
-
protoOf(Companion_2).
|
|
774
|
+
protoOf(Companion_2).i68 = function (randomPoolProvider, logger) {
|
|
774
775
|
var tmp17_random = new SecureRandom(logger);
|
|
775
776
|
return new CardsDealerProviderImpl(tmp17_random, randomPoolProvider, logger);
|
|
776
777
|
};
|
|
@@ -780,12 +781,12 @@
|
|
|
780
781
|
}
|
|
781
782
|
function $createNewShuffledCardDeckCOROUTINE$0(_this__u8e3s4, leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundCountForGame, userData, provider, resultContinuation) {
|
|
782
783
|
CoroutineImpl.call(this, resultContinuation);
|
|
783
|
-
this.
|
|
784
|
-
this.
|
|
785
|
-
this.
|
|
786
|
-
this.
|
|
787
|
-
this.
|
|
788
|
-
this.
|
|
784
|
+
this.r68_1 = _this__u8e3s4;
|
|
785
|
+
this.s68_1 = leftCardIndexForEachSuit;
|
|
786
|
+
this.t68_1 = rightCardIndexForEachSuit;
|
|
787
|
+
this.u68_1 = approximateRoundCountForGame;
|
|
788
|
+
this.v68_1 = userData;
|
|
789
|
+
this.w68_1 = provider;
|
|
789
790
|
}
|
|
790
791
|
protoOf($createNewShuffledCardDeckCOROUTINE$0).n9 = function () {
|
|
791
792
|
var suspendResult = this.h9_1;
|
|
@@ -795,26 +796,26 @@
|
|
|
795
796
|
switch (tmp) {
|
|
796
797
|
case 0:
|
|
797
798
|
this.g9_1 = 4;
|
|
798
|
-
this.
|
|
799
|
-
this.
|
|
800
|
-
if (this.
|
|
799
|
+
this.x68_1 = this.w68_1;
|
|
800
|
+
this.y68_1 = this.x68_1.o2_1;
|
|
801
|
+
if (this.y68_1 === 0) {
|
|
801
802
|
var tmp_0 = this;
|
|
802
|
-
var it = this.
|
|
803
|
-
tmp_0.
|
|
803
|
+
var it = this.r68_1.g67(this.s68_1, this.t68_1);
|
|
804
|
+
tmp_0.z68_1 = this.r68_1.k67(it);
|
|
804
805
|
this.f9_1 = 3;
|
|
805
806
|
continue $sm;
|
|
806
807
|
} else {
|
|
807
|
-
if (this.
|
|
808
|
+
if (this.y68_1 === 1) {
|
|
808
809
|
this.f9_1 = 2;
|
|
809
|
-
suspendResult = getRandomOrgCards(this.
|
|
810
|
+
suspendResult = getRandomOrgCards(this.r68_1, this.s68_1, this.t68_1, this.u68_1, this.v68_1, false, this);
|
|
810
811
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
811
812
|
return suspendResult;
|
|
812
813
|
}
|
|
813
814
|
continue $sm;
|
|
814
815
|
} else {
|
|
815
|
-
if (this.
|
|
816
|
+
if (this.y68_1 === 2) {
|
|
816
817
|
this.f9_1 = 1;
|
|
817
|
-
suspendResult = getRandomOrgCards(this.
|
|
818
|
+
suspendResult = getRandomOrgCards(this.r68_1, this.s68_1, this.t68_1, this.u68_1, this.v68_1, true, this);
|
|
818
819
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
819
820
|
return suspendResult;
|
|
820
821
|
}
|
|
@@ -828,15 +829,15 @@
|
|
|
828
829
|
|
|
829
830
|
break;
|
|
830
831
|
case 1:
|
|
831
|
-
this.
|
|
832
|
+
this.z68_1 = suspendResult;
|
|
832
833
|
this.f9_1 = 3;
|
|
833
834
|
continue $sm;
|
|
834
835
|
case 2:
|
|
835
|
-
this.
|
|
836
|
+
this.z68_1 = suspendResult;
|
|
836
837
|
this.f9_1 = 3;
|
|
837
838
|
continue $sm;
|
|
838
839
|
case 3:
|
|
839
|
-
return this.
|
|
840
|
+
return this.z68_1;
|
|
840
841
|
case 4:
|
|
841
842
|
throw this.i9_1;
|
|
842
843
|
}
|
|
@@ -853,12 +854,12 @@
|
|
|
853
854
|
};
|
|
854
855
|
function $getRandomOrgCardsCOROUTINE$1(_this__u8e3s4, leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundsCount, userData, signed, resultContinuation) {
|
|
855
856
|
CoroutineImpl.call(this, resultContinuation);
|
|
856
|
-
this.
|
|
857
|
-
this.
|
|
858
|
-
this.
|
|
859
|
-
this.
|
|
860
|
-
this.
|
|
861
|
-
this.
|
|
857
|
+
this.v67_1 = _this__u8e3s4;
|
|
858
|
+
this.w67_1 = leftCardIndexForEachSuit;
|
|
859
|
+
this.x67_1 = rightCardIndexForEachSuit;
|
|
860
|
+
this.y67_1 = approximateRoundsCount;
|
|
861
|
+
this.z67_1 = userData;
|
|
862
|
+
this.a68_1 = signed;
|
|
862
863
|
}
|
|
863
864
|
protoOf($getRandomOrgCardsCOROUTINE$1).n9 = function () {
|
|
864
865
|
var suspendResult = this.h9_1;
|
|
@@ -874,14 +875,14 @@
|
|
|
874
875
|
while (tmp0_iterator.k()) {
|
|
875
876
|
var element = tmp0_iterator.l();
|
|
876
877
|
var tmp_1 = sum;
|
|
877
|
-
sum = tmp_1 + count(getCardsRange(this.
|
|
878
|
+
sum = tmp_1 + count(getCardsRange(this.v67_1, this.w67_1, this.x67_1)) | 0;
|
|
878
879
|
}
|
|
879
880
|
|
|
880
|
-
tmp_0.
|
|
881
|
-
this.
|
|
882
|
-
this.
|
|
881
|
+
tmp_0.b68_1 = sum;
|
|
882
|
+
this.c68_1 = this.v67_1.b69_1;
|
|
883
|
+
this.d68_1 = this.b68_1 - 1 | 0;
|
|
883
884
|
this.f9_1 = 1;
|
|
884
|
-
suspendResult = this.
|
|
885
|
+
suspendResult = this.c68_1.h5r(this.y67_1, this.z67_1, 0, this.d68_1, this.b68_1, this.a68_1, VOID, this);
|
|
885
886
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
886
887
|
return suspendResult;
|
|
887
888
|
}
|
|
@@ -889,34 +890,34 @@
|
|
|
889
890
|
this.f9_1 = 2;
|
|
890
891
|
continue $sm;
|
|
891
892
|
case 1:
|
|
892
|
-
this.
|
|
893
|
-
suspendResult = new Result(this.
|
|
893
|
+
this.e68_1 = suspendResult.ek_1;
|
|
894
|
+
suspendResult = new Result(this.e68_1);
|
|
894
895
|
this.f9_1 = 2;
|
|
895
896
|
continue $sm;
|
|
896
897
|
case 2:
|
|
897
|
-
this.
|
|
898
|
-
if (_Result___get_isSuccess__impl__sndoy8(this.
|
|
898
|
+
this.f68_1 = suspendResult.ek_1;
|
|
899
|
+
if (_Result___get_isSuccess__impl__sndoy8(this.f68_1)) {
|
|
899
900
|
var tmp_2 = this;
|
|
900
|
-
var this_0 = this.
|
|
901
|
+
var this_0 = this.f68_1;
|
|
901
902
|
throwOnFailure(this_0);
|
|
902
903
|
var tmp_3 = _Result___get_value__impl__bjfvqg(this_0);
|
|
903
904
|
var tmp14_cards = ((tmp_3 == null ? true : !(tmp_3 == null)) ? tmp_3 : THROW_CCE()).cards;
|
|
904
|
-
var this_1 = normalizeCards(this.
|
|
905
|
+
var this_1 = normalizeCards(this.v67_1, tmp14_cards, this.w67_1);
|
|
905
906
|
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_1, 10));
|
|
906
907
|
var tmp0_iterator_0 = this_1.j();
|
|
907
908
|
while (tmp0_iterator_0.k()) {
|
|
908
909
|
var item = tmp0_iterator_0.l();
|
|
909
|
-
destination.e(Companion_instance.
|
|
910
|
+
destination.e(Companion_instance.t66(item));
|
|
910
911
|
}
|
|
911
|
-
tmp_2.
|
|
912
|
+
tmp_2.g68_1 = destination;
|
|
912
913
|
this.f9_1 = 4;
|
|
913
914
|
continue $sm;
|
|
914
915
|
} else {
|
|
915
|
-
this.
|
|
916
|
-
var tmp15_safe_receiver = this.
|
|
917
|
-
this.
|
|
916
|
+
this.h68_1 = Result__exceptionOrNull_impl_p6xea9(this.f68_1);
|
|
917
|
+
var tmp15_safe_receiver = this.h68_1;
|
|
918
|
+
this.v67_1.c69_1.v('CardsDealerProvider', 'getRandomOrgCards: ' + (tmp15_safe_receiver == null ? null : tmp15_safe_receiver.message), this.h68_1);
|
|
918
919
|
this.f9_1 = 3;
|
|
919
|
-
suspendResult = this.
|
|
920
|
+
suspendResult = this.v67_1.h67(this.w67_1, this.x67_1, this.y67_1, this.z67_1, CardsRandomProvider_CUSTOM_getInstance(), this);
|
|
920
921
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
921
922
|
return suspendResult;
|
|
922
923
|
}
|
|
@@ -924,11 +925,11 @@
|
|
|
924
925
|
}
|
|
925
926
|
|
|
926
927
|
case 3:
|
|
927
|
-
this.
|
|
928
|
+
this.g68_1 = suspendResult;
|
|
928
929
|
this.f9_1 = 4;
|
|
929
930
|
continue $sm;
|
|
930
931
|
case 4:
|
|
931
|
-
return this.
|
|
932
|
+
return this.g68_1;
|
|
932
933
|
case 5:
|
|
933
934
|
throw this.i9_1;
|
|
934
935
|
}
|
|
@@ -944,11 +945,11 @@
|
|
|
944
945
|
while (true);
|
|
945
946
|
};
|
|
946
947
|
function CardsDealerProviderImpl(random, randomPoolProvider, logger) {
|
|
947
|
-
this.
|
|
948
|
-
this.
|
|
949
|
-
this.
|
|
948
|
+
this.a69_1 = random;
|
|
949
|
+
this.b69_1 = randomPoolProvider;
|
|
950
|
+
this.c69_1 = logger;
|
|
950
951
|
}
|
|
951
|
-
protoOf(CardsDealerProviderImpl).
|
|
952
|
+
protoOf(CardsDealerProviderImpl).g67 = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit) {
|
|
952
953
|
// Inline function 'kotlin.collections.flatMap' call
|
|
953
954
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
954
955
|
var this_0 = get_entries();
|
|
@@ -969,7 +970,7 @@
|
|
|
969
970
|
inductionVariable = inductionVariable + 1 | 0;
|
|
970
971
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.cards.CardsDealerProviderImpl.createNewCardDeck.<anonymous>.<anonymous>' call
|
|
971
972
|
var it = item;
|
|
972
|
-
var tmp$ret$0 = Companion_instance.
|
|
973
|
+
var tmp$ret$0 = Companion_instance.r66(element, it);
|
|
973
974
|
destination_0.e(tmp$ret$0);
|
|
974
975
|
}
|
|
975
976
|
while (!(item === last));
|
|
@@ -978,13 +979,13 @@
|
|
|
978
979
|
}
|
|
979
980
|
return destination;
|
|
980
981
|
};
|
|
981
|
-
protoOf(CardsDealerProviderImpl).
|
|
982
|
+
protoOf(CardsDealerProviderImpl).h67 = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundCountForGame, userData, provider, $completion) {
|
|
982
983
|
var tmp = new $createNewShuffledCardDeckCOROUTINE$0(this, leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundCountForGame, userData, provider, $completion);
|
|
983
984
|
tmp.h9_1 = Unit_instance;
|
|
984
985
|
tmp.i9_1 = null;
|
|
985
986
|
return tmp.n9();
|
|
986
987
|
};
|
|
987
|
-
protoOf(CardsDealerProviderImpl).
|
|
988
|
+
protoOf(CardsDealerProviderImpl).i67 = function (count, cards) {
|
|
988
989
|
// Inline function 'kotlin.apply' call
|
|
989
990
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
990
991
|
var this_0 = ArrayList_init_$Create$();
|
|
@@ -1018,7 +1019,7 @@
|
|
|
1018
1019
|
while (tmp0_iterator.k()) {
|
|
1019
1020
|
var element = tmp0_iterator.l();
|
|
1020
1021
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.cards.CardsDealerProviderImpl.getNRandomUniqueCards.<anonymous>.<anonymous>' call
|
|
1021
|
-
if (element.
|
|
1022
|
+
if (element.q66() === card.q66()) {
|
|
1022
1023
|
tmp$ret$2 = true;
|
|
1023
1024
|
break $l$block_1;
|
|
1024
1025
|
}
|
|
@@ -1033,7 +1034,7 @@
|
|
|
1033
1034
|
}
|
|
1034
1035
|
return this_0;
|
|
1035
1036
|
};
|
|
1036
|
-
protoOf(CardsDealerProviderImpl).
|
|
1037
|
+
protoOf(CardsDealerProviderImpl).j67 = function (cards, times) {
|
|
1037
1038
|
// Inline function 'kotlin.let' call
|
|
1038
1039
|
// Inline function 'kotlin.contracts.contract' call
|
|
1039
1040
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.cards.CardsDealerProviderImpl.standardShuffledCards.<anonymous>' call
|
|
@@ -1043,55 +1044,55 @@
|
|
|
1043
1044
|
do {
|
|
1044
1045
|
var i = inductionVariable;
|
|
1045
1046
|
inductionVariable = inductionVariable + 1 | 0;
|
|
1046
|
-
shuffled = this.
|
|
1047
|
+
shuffled = this.a69_1.m5w(shuffled);
|
|
1047
1048
|
}
|
|
1048
1049
|
while (inductionVariable < times);
|
|
1049
1050
|
return shuffled;
|
|
1050
1051
|
};
|
|
1051
|
-
protoOf(CardsDealerProviderImpl).
|
|
1052
|
-
return toList(overhand(riffle(toMutableList(cards), times, this.
|
|
1052
|
+
protoOf(CardsDealerProviderImpl).l67 = function (cards, times) {
|
|
1053
|
+
return toList(overhand(riffle(toMutableList(cards), times, this.a69_1), times, this.a69_1));
|
|
1053
1054
|
};
|
|
1054
1055
|
function Companion_3() {
|
|
1055
1056
|
}
|
|
1056
|
-
protoOf(Companion_3).
|
|
1057
|
+
protoOf(Companion_3).d69 = function () {
|
|
1057
1058
|
// Inline function 'kotlin.apply' call
|
|
1058
1059
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
1059
1060
|
var this_0 = ArrayList_init_$Create$();
|
|
1060
1061
|
// Inline function 'kotlin.contracts.contract' call
|
|
1061
1062
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.cards.Companion.getCards.<anonymous>' call
|
|
1062
|
-
this_0.n(listOf([Companion_instance.
|
|
1063
|
-
this_0.n(listOf([Companion_instance.
|
|
1064
|
-
this_0.n(listOf([Companion_instance.
|
|
1065
|
-
this_0.n(listOf([Companion_instance.
|
|
1066
|
-
this_0.n(listOf([Companion_instance.
|
|
1063
|
+
this_0.n(listOf([Companion_instance.s66(Suit_DIAMOND_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.s66(Suit_CLUB_getInstance(), CardName_NINE_getInstance()), Companion_instance.s66(Suit_CLUB_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.s66(Suit_CLUB_getInstance(), CardName_TEN_getInstance()), Companion_instance.s66(Suit_HEART_getInstance(), CardName_JACK_getInstance()), Companion_instance.s66(Suit_HEART_getInstance(), CardName_KING_getInstance())]));
|
|
1064
|
+
this_0.n(listOf([Companion_instance.s66(Suit_CLUB_getInstance(), CardName_JACK_getInstance()), Companion_instance.s66(Suit_SPADE_getInstance(), CardName_ACE_getInstance()), Companion_instance.s66(Suit_DIAMOND_getInstance(), CardName_NINE_getInstance()), Companion_instance.s66(Suit_DIAMOND_getInstance(), CardName_TEN_getInstance()), Companion_instance.s66(Suit_DIAMOND_getInstance(), CardName_JACK_getInstance()), Companion_instance.s66(Suit_HEART_getInstance(), CardName_EIGHT_getInstance())]));
|
|
1065
|
+
this_0.n(listOf([Companion_instance.s66(Suit_CLUB_getInstance(), CardName_DAME_getInstance()), Companion_instance.s66(Suit_HEART_getInstance(), CardName_ACE_getInstance()), Companion_instance.s66(Suit_HEART_getInstance(), CardName_DAME_getInstance()), Companion_instance.s66(Suit_HEART_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.s66(Suit_SPADE_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.s66(Suit_CLUB_getInstance(), CardName_KING_getInstance())]));
|
|
1066
|
+
this_0.n(listOf([Companion_instance.s66(Suit_SPADE_getInstance(), CardName_EIGHT_getInstance()), Companion_instance.s66(Suit_SPADE_getInstance(), CardName_TEN_getInstance()), Companion_instance.s66(Suit_HEART_getInstance(), CardName_TEN_getInstance()), Companion_instance.s66(Suit_SPADE_getInstance(), CardName_JACK_getInstance()), Companion_instance.s66(Suit_DIAMOND_getInstance(), CardName_EIGHT_getInstance()), Companion_instance.s66(Suit_SPADE_getInstance(), CardName_DAME_getInstance())]));
|
|
1067
|
+
this_0.n(listOf([Companion_instance.s66(Suit_DIAMOND_getInstance(), CardName_ACE_getInstance()), Companion_instance.s66(Suit_CLUB_getInstance(), CardName_EIGHT_getInstance()), Companion_instance.s66(Suit_DIAMOND_getInstance(), CardName_KING_getInstance()), Companion_instance.s66(Suit_SPADE_getInstance(), CardName_NINE_getInstance()), Companion_instance.s66(Suit_CLUB_getInstance(), CardName_ACE_getInstance()), Companion_instance.s66(Suit_SPADE_getInstance(), CardName_KING_getInstance()), Companion_instance.s66(Suit_DIAMOND_getInstance(), CardName_DAME_getInstance()), Companion_instance.s66(Suit_HEART_getInstance(), CardName_NINE_getInstance())]));
|
|
1067
1068
|
return this_0;
|
|
1068
1069
|
};
|
|
1069
|
-
protoOf(Companion_3).
|
|
1070
|
-
return listOf([Companion_instance.
|
|
1070
|
+
protoOf(Companion_3).e69 = function () {
|
|
1071
|
+
return listOf([Companion_instance.s66(Suit_CLUB_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.s66(Suit_HEART_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.s66(Suit_SPADE_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.s66(Suit_SPADE_getInstance(), CardName_EIGHT_getInstance())]);
|
|
1071
1072
|
};
|
|
1072
1073
|
var Companion_instance_3;
|
|
1073
1074
|
function Companion_getInstance_3() {
|
|
1074
1075
|
return Companion_instance_3;
|
|
1075
1076
|
}
|
|
1076
1077
|
function FakeCardsDealerProvider(cards, cardsForLot) {
|
|
1077
|
-
cards = cards === VOID ? Companion_instance_3.
|
|
1078
|
-
cardsForLot = cardsForLot === VOID ? Companion_instance_3.
|
|
1079
|
-
this.
|
|
1080
|
-
this.
|
|
1078
|
+
cards = cards === VOID ? Companion_instance_3.d69() : cards;
|
|
1079
|
+
cardsForLot = cardsForLot === VOID ? Companion_instance_3.e69() : cardsForLot;
|
|
1080
|
+
this.f69_1 = cards;
|
|
1081
|
+
this.g69_1 = cardsForLot;
|
|
1081
1082
|
}
|
|
1082
|
-
protoOf(FakeCardsDealerProvider).
|
|
1083
|
-
return this.
|
|
1083
|
+
protoOf(FakeCardsDealerProvider).g67 = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit) {
|
|
1084
|
+
return this.f69_1;
|
|
1084
1085
|
};
|
|
1085
|
-
protoOf(FakeCardsDealerProvider).
|
|
1086
|
-
return this.
|
|
1086
|
+
protoOf(FakeCardsDealerProvider).h67 = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundCountForGame, userData, provider, $completion) {
|
|
1087
|
+
return this.f69_1;
|
|
1087
1088
|
};
|
|
1088
|
-
protoOf(FakeCardsDealerProvider).
|
|
1089
|
-
return this.
|
|
1089
|
+
protoOf(FakeCardsDealerProvider).i67 = function (count, cards) {
|
|
1090
|
+
return this.g69_1;
|
|
1090
1091
|
};
|
|
1091
|
-
protoOf(FakeCardsDealerProvider).
|
|
1092
|
+
protoOf(FakeCardsDealerProvider).j67 = function (cards, times) {
|
|
1092
1093
|
return cards;
|
|
1093
1094
|
};
|
|
1094
|
-
protoOf(FakeCardsDealerProvider).
|
|
1095
|
+
protoOf(FakeCardsDealerProvider).l67 = function (cards, times) {
|
|
1095
1096
|
return cards;
|
|
1096
1097
|
};
|
|
1097
1098
|
function CombinationsCheckerProvider() {
|
|
@@ -1120,16 +1121,16 @@
|
|
|
1120
1121
|
return takeLast(cards, longestCombinationSupport);
|
|
1121
1122
|
}
|
|
1122
1123
|
function sam$kotlin_Comparator$0(function_0) {
|
|
1123
|
-
this.
|
|
1124
|
+
this.m69_1 = function_0;
|
|
1124
1125
|
}
|
|
1125
1126
|
protoOf(sam$kotlin_Comparator$0).nc = function (a, b) {
|
|
1126
|
-
return this.
|
|
1127
|
+
return this.m69_1(a, b);
|
|
1127
1128
|
};
|
|
1128
1129
|
protoOf(sam$kotlin_Comparator$0).compare = function (a, b) {
|
|
1129
1130
|
return this.nc(a, b);
|
|
1130
1131
|
};
|
|
1131
1132
|
protoOf(sam$kotlin_Comparator$0).p3 = function () {
|
|
1132
|
-
return this.
|
|
1133
|
+
return this.m69_1;
|
|
1133
1134
|
};
|
|
1134
1135
|
protoOf(sam$kotlin_Comparator$0).equals = function (other) {
|
|
1135
1136
|
var tmp;
|
|
@@ -1152,14 +1153,14 @@
|
|
|
1152
1153
|
function CombinationsCheckerProviderImpl$createCombinationsFromCardsInRow$lambda(a, b) {
|
|
1153
1154
|
// Inline function 'kotlin.comparisons.compareValuesBy' call
|
|
1154
1155
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.combinations.CombinationsCheckerProviderImpl.createCombinationsFromCardsInRow.<anonymous>' call
|
|
1155
|
-
var tmp = first_0(a).
|
|
1156
|
+
var tmp = first_0(a).p66_1;
|
|
1156
1157
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.combinations.CombinationsCheckerProviderImpl.createCombinationsFromCardsInRow.<anonymous>' call
|
|
1157
|
-
var tmp$ret$1 = first_0(b).
|
|
1158
|
+
var tmp$ret$1 = first_0(b).p66_1;
|
|
1158
1159
|
return compareValues(tmp, tmp$ret$1);
|
|
1159
1160
|
}
|
|
1160
1161
|
function CombinationsCheckerProviderImpl() {
|
|
1161
1162
|
}
|
|
1162
|
-
protoOf(CombinationsCheckerProviderImpl).
|
|
1163
|
+
protoOf(CombinationsCheckerProviderImpl).h69 = function (cards, supportedCombinations, checkFromIndex, includeCardNames, suit) {
|
|
1163
1164
|
// Inline function 'kotlin.collections.filter' call
|
|
1164
1165
|
// Inline function 'kotlin.apply' call
|
|
1165
1166
|
var this_0 = toMutableList(cards);
|
|
@@ -1172,7 +1173,7 @@
|
|
|
1172
1173
|
while (tmp0_iterator.k()) {
|
|
1173
1174
|
var element = tmp0_iterator.l();
|
|
1174
1175
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.combinations.CombinationsCheckerProviderImpl.findCardsInRowCombinations.<anonymous>' call
|
|
1175
|
-
if (element.
|
|
1176
|
+
if (element.e67()) {
|
|
1176
1177
|
destination.e(element);
|
|
1177
1178
|
}
|
|
1178
1179
|
}
|
|
@@ -1189,14 +1190,14 @@
|
|
|
1189
1190
|
inductionVariable = inductionVariable + 1 | 0;
|
|
1190
1191
|
var previousCard = lastOrNull(combinationCards);
|
|
1191
1192
|
var currentCard = sortedByIndexCards.o(i);
|
|
1192
|
-
var isNextInRow = !(previousCard == null) && currentCard.
|
|
1193
|
+
var isNextInRow = !(previousCard == null) && currentCard.p66_1 === (previousCard.p66_1 + 1 | 0) && currentCard.d67().equals(previousCard.d67());
|
|
1193
1194
|
var passedCardNamesCheck = includeCardNames == null || includeCardNames.s1(currentCard.p2());
|
|
1194
|
-
var passedSuitCheck = suit == null || currentCard.
|
|
1195
|
+
var passedSuitCheck = suit == null || currentCard.d67().equals(suit);
|
|
1195
1196
|
if (isNextInRow && passedSuitCheck && passedCardNamesCheck) {
|
|
1196
1197
|
combinationCards.e(currentCard);
|
|
1197
1198
|
} else {
|
|
1198
1199
|
if (combinationCards.m() > (checkFromIndex - 1 | 0)) {
|
|
1199
|
-
combinations.n(this.
|
|
1200
|
+
combinations.n(this.l69(toMutableList(combinationCards), supportedCombinations));
|
|
1200
1201
|
}
|
|
1201
1202
|
combinationCards.a2();
|
|
1202
1203
|
if (passedSuitCheck && passedCardNamesCheck) {
|
|
@@ -1206,11 +1207,11 @@
|
|
|
1206
1207
|
}
|
|
1207
1208
|
while (inductionVariable <= last);
|
|
1208
1209
|
if (combinationCards.m() > (checkFromIndex - 1 | 0)) {
|
|
1209
|
-
combinations.n(this.
|
|
1210
|
+
combinations.n(this.l69(toMutableList(combinationCards), supportedCombinations));
|
|
1210
1211
|
}
|
|
1211
1212
|
return combinations;
|
|
1212
1213
|
};
|
|
1213
|
-
protoOf(CombinationsCheckerProviderImpl).
|
|
1214
|
+
protoOf(CombinationsCheckerProviderImpl).j69 = function (cards, cardsCount, includeCardNames) {
|
|
1214
1215
|
// Inline function 'kotlin.collections.filter' call
|
|
1215
1216
|
// Inline function 'kotlin.collections.filter' call
|
|
1216
1217
|
// Inline function 'kotlin.apply' call
|
|
@@ -1224,7 +1225,7 @@
|
|
|
1224
1225
|
while (tmp0_iterator.k()) {
|
|
1225
1226
|
var element = tmp0_iterator.l();
|
|
1226
1227
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.combinations.CombinationsCheckerProviderImpl.findSameCardsNumberCombinations.<anonymous>' call
|
|
1227
|
-
if (element.
|
|
1228
|
+
if (element.e67()) {
|
|
1228
1229
|
destination.e(element);
|
|
1229
1230
|
}
|
|
1230
1231
|
}
|
|
@@ -1247,7 +1248,7 @@
|
|
|
1247
1248
|
while (tmp0_iterator_1.k()) {
|
|
1248
1249
|
var element_1 = tmp0_iterator_1.l();
|
|
1249
1250
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.combinations.CombinationsCheckerProviderImpl.findSameCardsNumberCombinations.<anonymous>' call
|
|
1250
|
-
var key = element_1.
|
|
1251
|
+
var key = element_1.q66();
|
|
1251
1252
|
// Inline function 'kotlin.collections.getOrPut' call
|
|
1252
1253
|
var value = destination_1.h2(key);
|
|
1253
1254
|
var tmp;
|
|
@@ -1286,7 +1287,7 @@
|
|
|
1286
1287
|
}
|
|
1287
1288
|
return destination_3;
|
|
1288
1289
|
};
|
|
1289
|
-
protoOf(CombinationsCheckerProviderImpl).
|
|
1290
|
+
protoOf(CombinationsCheckerProviderImpl).l69 = function (cards, supportedCombinations) {
|
|
1290
1291
|
// Inline function 'kotlin.collections.minOf' call
|
|
1291
1292
|
var iterator = supportedCombinations.j();
|
|
1292
1293
|
if (!iterator.k())
|
|
@@ -1316,28 +1317,28 @@
|
|
|
1316
1317
|
return sortedWith(combinations, tmp$ret$4);
|
|
1317
1318
|
};
|
|
1318
1319
|
function DealerReducerImpl(logger, enableLogs) {
|
|
1319
|
-
this.
|
|
1320
|
-
this.
|
|
1320
|
+
this.n69_1 = logger;
|
|
1321
|
+
this.o69_1 = enableLogs;
|
|
1321
1322
|
}
|
|
1322
|
-
protoOf(DealerReducerImpl).
|
|
1323
|
+
protoOf(DealerReducerImpl).p69 = function (cards, cardsToRemove) {
|
|
1323
1324
|
var list = cards;
|
|
1324
1325
|
var _iterator__ex2g4s = cardsToRemove.j();
|
|
1325
1326
|
while (_iterator__ex2g4s.k()) {
|
|
1326
1327
|
var gameCard = _iterator__ex2g4s.l();
|
|
1327
|
-
list = this.
|
|
1328
|
+
list = this.q69(list, gameCard);
|
|
1328
1329
|
}
|
|
1329
1330
|
return list;
|
|
1330
1331
|
};
|
|
1331
|
-
protoOf(DealerReducerImpl).
|
|
1332
|
+
protoOf(DealerReducerImpl).q69 = function (cards, cardToRemove) {
|
|
1332
1333
|
var tmp;
|
|
1333
|
-
if (!cardToRemove.
|
|
1334
|
-
if (this.
|
|
1335
|
-
this.
|
|
1334
|
+
if (!cardToRemove.v66() && cards.s1(cardToRemove)) {
|
|
1335
|
+
if (this.o69_1) {
|
|
1336
|
+
this.n69_1.d('Dealer', 'Card removed: ' + cardToRemove.toString() + ', size: ' + (cards.m() - 1 | 0));
|
|
1336
1337
|
}
|
|
1337
1338
|
tmp = minus(cards, cardToRemove);
|
|
1338
1339
|
} else {
|
|
1339
|
-
if (this.
|
|
1340
|
-
this.
|
|
1340
|
+
if (this.o69_1) {
|
|
1341
|
+
this.n69_1.d('Dealer', 'Card removed as stub: ' + cardToRemove.toString() + ', size: ' + (cards.m() - 1 | 0));
|
|
1341
1342
|
}
|
|
1342
1343
|
// Inline function 'kotlin.collections.filterNot' call
|
|
1343
1344
|
// Inline function 'kotlin.collections.filterNotTo' call
|
|
@@ -1346,7 +1347,7 @@
|
|
|
1346
1347
|
while (tmp0_iterator.k()) {
|
|
1347
1348
|
var element = tmp0_iterator.l();
|
|
1348
1349
|
// Inline function 'io.raspberryapps.card_game.core.domain.dealer.DealerReducerImpl.removeCard.<anonymous>' call
|
|
1349
|
-
if (!element.
|
|
1350
|
+
if (!element.v66()) {
|
|
1350
1351
|
destination.e(element);
|
|
1351
1352
|
}
|
|
1352
1353
|
}
|
|
@@ -1358,36 +1359,36 @@
|
|
|
1358
1359
|
while (tmp0_iterator_0.k()) {
|
|
1359
1360
|
var element_0 = tmp0_iterator_0.l();
|
|
1360
1361
|
// Inline function 'io.raspberryapps.card_game.core.domain.dealer.DealerReducerImpl.removeCard.<anonymous>' call
|
|
1361
|
-
if (element_0.
|
|
1362
|
+
if (element_0.v66()) {
|
|
1362
1363
|
destination_0.e(element_0);
|
|
1363
1364
|
}
|
|
1364
1365
|
}
|
|
1365
1366
|
var stubCards = destination_0;
|
|
1366
1367
|
if (stubCards.p()) {
|
|
1367
|
-
this.
|
|
1368
|
+
this.n69_1.w('Dealer', "Can't find card to delete for player, " + ('cards:' + toString(cards) + ', ') + ('cardToRemove: ' + cardToRemove.toString()));
|
|
1368
1369
|
}
|
|
1369
1370
|
tmp = plus(notStubCards, dropLast(stubCards, 1));
|
|
1370
1371
|
}
|
|
1371
1372
|
return tmp;
|
|
1372
1373
|
};
|
|
1373
|
-
protoOf(DealerReducerImpl).
|
|
1374
|
-
if (this.
|
|
1375
|
-
this.
|
|
1374
|
+
protoOf(DealerReducerImpl).r69 = function (cards, cardToAdd) {
|
|
1375
|
+
if (this.o69_1) {
|
|
1376
|
+
this.n69_1.d('Dealer', 'Card added: ' + cardToAdd.toString() + ', size: ' + (cards.m() + 1 | 0));
|
|
1376
1377
|
}
|
|
1377
1378
|
if (cards.s1(cardToAdd)) {
|
|
1378
|
-
this.
|
|
1379
|
+
this.n69_1.w('Dealer', 'Card already exists for player, ' + ('cards:' + toString(cards) + ', ') + ('cardToAdd: ' + cardToAdd.toString()));
|
|
1379
1380
|
}
|
|
1380
1381
|
return plus_0(cards, cardToAdd);
|
|
1381
1382
|
};
|
|
1382
1383
|
function DealerReducer() {
|
|
1383
1384
|
}
|
|
1384
1385
|
//region block: post-declaration
|
|
1385
|
-
protoOf(CardsDealerProviderImpl).
|
|
1386
|
-
protoOf(CardsDealerProviderImpl).
|
|
1387
|
-
protoOf(FakeCardsDealerProvider).
|
|
1388
|
-
protoOf(FakeCardsDealerProvider).
|
|
1389
|
-
protoOf(CombinationsCheckerProviderImpl).
|
|
1390
|
-
protoOf(CombinationsCheckerProviderImpl).
|
|
1386
|
+
protoOf(CardsDealerProviderImpl).k67 = standardShuffledCards$default;
|
|
1387
|
+
protoOf(CardsDealerProviderImpl).m67 = realLifeShuffledCards$default;
|
|
1388
|
+
protoOf(FakeCardsDealerProvider).k67 = standardShuffledCards$default;
|
|
1389
|
+
protoOf(FakeCardsDealerProvider).m67 = realLifeShuffledCards$default;
|
|
1390
|
+
protoOf(CombinationsCheckerProviderImpl).i69 = findCardsInRowCombinations$default;
|
|
1391
|
+
protoOf(CombinationsCheckerProviderImpl).k69 = findSameCardsNumberCombinations$default;
|
|
1391
1392
|
//endregion
|
|
1392
1393
|
//region block: init
|
|
1393
1394
|
CoreConfig_instance = new CoreConfig();
|