raspberry_games_server_game_logic 1.8.451 → 1.8.453
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 +92 -92
- package/Kosi-Kaverit-kaverit.js.map +1 -1
- package/Kosi-Kodein-kodein-di.js +823 -783
- package/Kosi-Kodein-kodein-di.js.map +1 -1
- package/Kotlin-DateTime-library-kotlinx-datetime.js +1919 -1919
- package/Kotlin-DateTime-library-kotlinx-datetime.js.map +1 -1
- package/Logic_Debertz-ai_module.js +684 -688
- package/Logic_Debertz-ai_module.js.map +1 -1
- package/Logic_Debertz-core.js +2039 -2051
- package/Logic_Debertz-core.js.map +1 -1
- package/Logic_Debertz-engine.js +19206 -19216
- package/Logic_Debertz-engine.js.map +1 -1
- package/Logic_Debertz-game_server.d.ts +756 -669
- package/Logic_Debertz-game_server.js +2258 -2267
- package/Logic_Debertz-game_server.js.map +1 -1
- package/error-library-error.js +7 -7
- package/kotlin-kotlin-stdlib.js +5743 -4870
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kotlinx-atomicfu.js +22 -22
- package/kotlinx-coroutines-core.js +3320 -3269
- package/kotlinx-coroutines-core.js.map +1 -1
- package/kotlinx-io-kotlinx-io-bytestring.js +204 -5
- package/kotlinx-io-kotlinx-io-bytestring.js.map +1 -1
- package/kotlinx-io-kotlinx-io-core.js +1689 -428
- package/kotlinx-io-kotlinx-io-core.js.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-core.js +2253 -2252
- package/kotlinx-serialization-kotlinx-serialization-core.js.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-json-io.js +15 -0
- package/kotlinx-serialization-kotlinx-serialization-json.js +1626 -1626
- package/kotlinx-serialization-kotlinx-serialization-json.js.map +1 -1
- package/ktor-ktor-client-content-negotiation.js +457 -395
- package/ktor-ktor-client-content-negotiation.js.map +1 -1
- package/ktor-ktor-client-core.js +6683 -3979
- package/ktor-ktor-client-core.js.map +1 -1
- package/ktor-ktor-client-logging.js +2626 -892
- package/ktor-ktor-client-logging.js.map +1 -1
- package/ktor-ktor-events.js +14 -14
- package/ktor-ktor-events.js.map +1 -1
- package/ktor-ktor-http-cio.js +2278 -0
- package/ktor-ktor-http-cio.js.map +1 -0
- package/ktor-ktor-http.js +1274 -1134
- package/ktor-ktor-http.js.map +1 -1
- package/ktor-ktor-io.js +2598 -5514
- package/ktor-ktor-io.js.map +1 -1
- package/ktor-ktor-serialization-kotlinx-json.js +8 -8
- package/ktor-ktor-serialization-kotlinx-json.js.map +1 -1
- package/ktor-ktor-serialization-kotlinx.js +332 -338
- package/ktor-ktor-serialization-kotlinx.js.map +1 -1
- package/ktor-ktor-serialization.js +143 -153
- package/ktor-ktor-serialization.js.map +1 -1
- package/{ktor-ktor-client-js.js → ktor-ktor-sse.js} +2 -2
- package/ktor-ktor-sse.js.map +1 -0
- package/ktor-ktor-utils.js +1708 -1141
- package/ktor-ktor-utils.js.map +1 -1
- package/ktor-ktor-websockets.js +123 -136
- package/ktor-ktor-websockets.js.map +1 -1
- package/package.json +2 -4
- package/random-library-crypto-rand.js +15 -15
- package/random-library-crypto-rand.js.map +1 -1
- package/random-library-secure-random.js +10 -10
- package/random-library-secure-random.js.map +1 -1
- package/raspberry-cardgame-lib-core.js +365 -366
- package/raspberry-cardgame-lib-core.js.map +1 -1
- package/raspberry-cardgame-lib-logger.js +120 -121
- package/raspberry-cardgame-lib-logger.js.map +1 -1
- package/raspberry-cardgame-lib-random.js +1181 -1207
- package/raspberry-cardgame-lib-random.js.map +1 -1
- package/uuid.js +38 -38
- package/uuid.js.map +1 -1
- /package/{ktor-ktor-client-js.js.map → kotlinx-serialization-kotlinx-serialization-json-io.js.map} +0 -0
|
@@ -19,68 +19,68 @@
|
|
|
19
19
|
'use strict';
|
|
20
20
|
//region block: imports
|
|
21
21
|
var imul = Math.imul;
|
|
22
|
-
var protoOf = kotlin_kotlin.$_$.
|
|
23
|
-
var initMetadataForObject = kotlin_kotlin.$_$.
|
|
24
|
-
var defineProp = kotlin_kotlin.$_$.
|
|
22
|
+
var protoOf = kotlin_kotlin.$_$.wd;
|
|
23
|
+
var initMetadataForObject = kotlin_kotlin.$_$.bd;
|
|
24
|
+
var defineProp = kotlin_kotlin.$_$.nc;
|
|
25
25
|
var VOID = kotlin_kotlin.$_$.b;
|
|
26
|
-
var THROW_CCE = kotlin_kotlin.$_$.
|
|
27
|
-
var Comparator = kotlin_kotlin.$_$.
|
|
28
|
-
var take = kotlin_kotlin.$_$.
|
|
29
|
-
var toList = kotlin_kotlin.$_$.
|
|
30
|
-
var Unit_instance = kotlin_kotlin.$_$.
|
|
31
|
-
var takeLast = kotlin_kotlin.$_$.
|
|
32
|
-
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.
|
|
33
|
-
var noWhenBranchMatchedException = kotlin_kotlin.$_$.
|
|
34
|
-
var initMetadataForCompanion = kotlin_kotlin.$_$.
|
|
35
|
-
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.
|
|
36
|
-
var Enum = kotlin_kotlin.$_$.
|
|
37
|
-
var initMetadataForClass = kotlin_kotlin.$_$.
|
|
26
|
+
var THROW_CCE = kotlin_kotlin.$_$.hi;
|
|
27
|
+
var Comparator = kotlin_kotlin.$_$.uh;
|
|
28
|
+
var take = kotlin_kotlin.$_$.n9;
|
|
29
|
+
var toList = kotlin_kotlin.$_$.s9;
|
|
30
|
+
var Unit_instance = kotlin_kotlin.$_$.h5;
|
|
31
|
+
var takeLast = kotlin_kotlin.$_$.m9;
|
|
32
|
+
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.i;
|
|
33
|
+
var noWhenBranchMatchedException = kotlin_kotlin.$_$.gj;
|
|
34
|
+
var initMetadataForCompanion = kotlin_kotlin.$_$.wc;
|
|
35
|
+
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.r1;
|
|
36
|
+
var Enum = kotlin_kotlin.$_$.xh;
|
|
37
|
+
var initMetadataForClass = kotlin_kotlin.$_$.vc;
|
|
38
38
|
var createSimpleEnumSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.h2;
|
|
39
|
-
var enumEntries = kotlin_kotlin.$_$.
|
|
39
|
+
var enumEntries = kotlin_kotlin.$_$.ab;
|
|
40
40
|
var LazyThreadSafetyMode_PUBLICATION_getInstance = kotlin_kotlin.$_$.e;
|
|
41
|
-
var lazy = kotlin_kotlin.$_$.
|
|
41
|
+
var lazy = kotlin_kotlin.$_$.ej;
|
|
42
42
|
var SerializerFactory = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.f2;
|
|
43
|
-
var initMetadataForInterface = kotlin_kotlin.$_$.
|
|
44
|
-
var collectionSizeOrDefault = kotlin_kotlin.$_$.
|
|
45
|
-
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.
|
|
43
|
+
var initMetadataForInterface = kotlin_kotlin.$_$.zc;
|
|
44
|
+
var collectionSizeOrDefault = kotlin_kotlin.$_$.k6;
|
|
45
|
+
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.h;
|
|
46
46
|
var SecureRandom = kotlin_io_raspberryapps_cardgame_random.$_$.j;
|
|
47
|
-
var CoroutineImpl = kotlin_kotlin.$_$.
|
|
48
|
-
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.
|
|
49
|
-
var initMetadataForCoroutine = kotlin_kotlin.$_$.
|
|
50
|
-
var Result = kotlin_kotlin.$_$.
|
|
51
|
-
var Result__exceptionOrNull_impl_p6xea9 = kotlin_kotlin.$_$.
|
|
52
|
-
var throwOnFailure = kotlin_kotlin.$_$.
|
|
53
|
-
var _Result___get_value__impl__bjfvqg = kotlin_kotlin.$_$.
|
|
54
|
-
var _Result___get_isSuccess__impl__sndoy8 = kotlin_kotlin.$_$.
|
|
55
|
-
var addAll = kotlin_kotlin.$_$.
|
|
56
|
-
var until = kotlin_kotlin.$_$.
|
|
57
|
-
var count = kotlin_kotlin.$_$.
|
|
58
|
-
var Collection = kotlin_kotlin.$_$.
|
|
59
|
-
var isInterface = kotlin_kotlin.$_$.
|
|
60
|
-
var toMutableList = kotlin_kotlin.$_$.
|
|
47
|
+
var CoroutineImpl = kotlin_kotlin.$_$.ya;
|
|
48
|
+
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.ia;
|
|
49
|
+
var initMetadataForCoroutine = kotlin_kotlin.$_$.xc;
|
|
50
|
+
var Result = kotlin_kotlin.$_$.fi;
|
|
51
|
+
var Result__exceptionOrNull_impl_p6xea9 = kotlin_kotlin.$_$.w2;
|
|
52
|
+
var throwOnFailure = kotlin_kotlin.$_$.kj;
|
|
53
|
+
var _Result___get_value__impl__bjfvqg = kotlin_kotlin.$_$.z2;
|
|
54
|
+
var _Result___get_isSuccess__impl__sndoy8 = kotlin_kotlin.$_$.y2;
|
|
55
|
+
var addAll = kotlin_kotlin.$_$.y5;
|
|
56
|
+
var until = kotlin_kotlin.$_$.le;
|
|
57
|
+
var count = kotlin_kotlin.$_$.c7;
|
|
58
|
+
var Collection = kotlin_kotlin.$_$.j5;
|
|
59
|
+
var isInterface = kotlin_kotlin.$_$.kd;
|
|
60
|
+
var toMutableList = kotlin_kotlin.$_$.x9;
|
|
61
61
|
var riffle = kotlin_io_raspberryapps_cardgame_random.$_$.l;
|
|
62
62
|
var overhand = kotlin_io_raspberryapps_cardgame_random.$_$.k;
|
|
63
|
-
var listOf = kotlin_kotlin.$_$.
|
|
64
|
-
var first = kotlin_kotlin.$_$.
|
|
65
|
-
var sorted = kotlin_kotlin.$_$.
|
|
66
|
-
var asReversed = kotlin_kotlin.$_$.
|
|
67
|
-
var NoSuchElementException_init_$Create$ = kotlin_kotlin.$_$.
|
|
68
|
-
var equals = kotlin_kotlin.$_$.
|
|
69
|
-
var FunctionAdapter = kotlin_kotlin.$_$.
|
|
70
|
-
var hashCode = kotlin_kotlin.$_$.
|
|
71
|
-
var first_0 = kotlin_kotlin.$_$.
|
|
72
|
-
var compareValues = kotlin_kotlin.$_$.
|
|
73
|
-
var sortWith = kotlin_kotlin.$_$.
|
|
74
|
-
var lastOrNull = kotlin_kotlin.$_$.
|
|
75
|
-
var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.
|
|
76
|
-
var sortedWith = kotlin_kotlin.$_$.
|
|
77
|
-
var NoSuchElementException_init_$Create$_0 = kotlin_kotlin.$_$.
|
|
78
|
-
var compareTo = kotlin_kotlin.$_$.
|
|
79
|
-
var toString = kotlin_kotlin.$_$.
|
|
80
|
-
var dropLast = kotlin_kotlin.$_$.
|
|
81
|
-
var plus = kotlin_kotlin.$_$.
|
|
82
|
-
var minus = kotlin_kotlin.$_$.
|
|
83
|
-
var plus_0 = kotlin_kotlin.$_$.
|
|
63
|
+
var listOf = kotlin_kotlin.$_$.k8;
|
|
64
|
+
var first = kotlin_kotlin.$_$.p7;
|
|
65
|
+
var sorted = kotlin_kotlin.$_$.k9;
|
|
66
|
+
var asReversed = kotlin_kotlin.$_$.c6;
|
|
67
|
+
var NoSuchElementException_init_$Create$ = kotlin_kotlin.$_$.x1;
|
|
68
|
+
var equals = kotlin_kotlin.$_$.oc;
|
|
69
|
+
var FunctionAdapter = kotlin_kotlin.$_$.bc;
|
|
70
|
+
var hashCode = kotlin_kotlin.$_$.uc;
|
|
71
|
+
var first_0 = kotlin_kotlin.$_$.o7;
|
|
72
|
+
var compareValues = kotlin_kotlin.$_$.ga;
|
|
73
|
+
var sortWith = kotlin_kotlin.$_$.i9;
|
|
74
|
+
var lastOrNull = kotlin_kotlin.$_$.e8;
|
|
75
|
+
var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.r;
|
|
76
|
+
var sortedWith = kotlin_kotlin.$_$.j9;
|
|
77
|
+
var NoSuchElementException_init_$Create$_0 = kotlin_kotlin.$_$.v1;
|
|
78
|
+
var compareTo = kotlin_kotlin.$_$.mc;
|
|
79
|
+
var toString = kotlin_kotlin.$_$.zd;
|
|
80
|
+
var dropLast = kotlin_kotlin.$_$.e7;
|
|
81
|
+
var plus = kotlin_kotlin.$_$.v8;
|
|
82
|
+
var minus = kotlin_kotlin.$_$.p8;
|
|
83
|
+
var plus_0 = kotlin_kotlin.$_$.w8;
|
|
84
84
|
//endregion
|
|
85
85
|
//region block: pre-declaration
|
|
86
86
|
initMetadataForObject(CoreConfig, 'CoreConfig');
|
|
@@ -95,11 +95,11 @@
|
|
|
95
95
|
initMetadataForClass(CardsRandomProvider, 'CardsRandomProvider', VOID, Enum);
|
|
96
96
|
function standardShuffledCards$default(cards, times, $super) {
|
|
97
97
|
times = times === VOID ? 3 : times;
|
|
98
|
-
return $super === VOID ? this.
|
|
98
|
+
return $super === VOID ? this.o65(cards, times) : $super.o65.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.q65(cards, times) : $super.q65.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.g67(cards, supportedCombinations, checkFromIndex, includeCardNames, suit) : $super.g67.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.i67(cards, cardsCount, includeCardNames) : $super.i67.call(this, cards, cardsCount, includeCardNames);
|
|
121
121
|
}
|
|
122
122
|
initMetadataForInterface(CombinationsCheckerProvider, 'CombinationsCheckerProvider');
|
|
123
123
|
initMetadataForClass(sam$kotlin_Comparator$0, 'sam$kotlin_Comparator$0', VOID, VOID, [Comparator, FunctionAdapter]);
|
|
@@ -126,9 +126,9 @@
|
|
|
126
126
|
initMetadataForClass(DealerReducerImpl, 'DealerReducerImpl', VOID, VOID, [DealerReducer]);
|
|
127
127
|
//endregion
|
|
128
128
|
function CoreConfig() {
|
|
129
|
-
this.version = '0.0.
|
|
129
|
+
this.version = '0.0.58';
|
|
130
130
|
}
|
|
131
|
-
protoOf(CoreConfig).
|
|
131
|
+
protoOf(CoreConfig).v42 = function () {
|
|
132
132
|
return this.version;
|
|
133
133
|
};
|
|
134
134
|
var CoreConfig_instance;
|
|
@@ -137,12 +137,12 @@
|
|
|
137
137
|
}
|
|
138
138
|
function CardIndexComparator() {
|
|
139
139
|
}
|
|
140
|
-
protoOf(CardIndexComparator).
|
|
141
|
-
return a.
|
|
140
|
+
protoOf(CardIndexComparator).p64 = function (a, b) {
|
|
141
|
+
return a.q64_1 - b.q64_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.p64(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).p64 = function (a, b) {
|
|
154
|
+
return b.r64() - a.r64() | 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.p64(tmp, b instanceof GameCard ? b : THROW_CCE());
|
|
159
159
|
};
|
|
160
160
|
var CardNumberComparator_instance;
|
|
161
161
|
function CardNumberComparator_getInstance() {
|
|
@@ -163,12 +163,12 @@
|
|
|
163
163
|
}
|
|
164
164
|
function distributeCardsBottom(_this__u8e3s4, count) {
|
|
165
165
|
var cardsToDeal = toList(take(_this__u8e3s4, count));
|
|
166
|
-
_this__u8e3s4.
|
|
166
|
+
_this__u8e3s4.f3(cardsToDeal);
|
|
167
167
|
return cardsToDeal;
|
|
168
168
|
}
|
|
169
169
|
function distributeCardsTop(_this__u8e3s4, count) {
|
|
170
170
|
var cardsToDeal = toList(takeLast(_this__u8e3s4, count));
|
|
171
|
-
_this__u8e3s4.
|
|
171
|
+
_this__u8e3s4.f3(cardsToDeal);
|
|
172
172
|
return cardsToDeal;
|
|
173
173
|
}
|
|
174
174
|
function filterByCardName(_this__u8e3s4, name) {
|
|
@@ -176,11 +176,11 @@
|
|
|
176
176
|
var predicate = byCardNamePredicate(name.slice());
|
|
177
177
|
// Inline function 'kotlin.collections.filterTo' call
|
|
178
178
|
var destination = ArrayList_init_$Create$();
|
|
179
|
-
var _iterator__ex2g4s = _this__u8e3s4.
|
|
180
|
-
while (_iterator__ex2g4s.
|
|
181
|
-
var element = _iterator__ex2g4s.
|
|
179
|
+
var _iterator__ex2g4s = _this__u8e3s4.t();
|
|
180
|
+
while (_iterator__ex2g4s.u()) {
|
|
181
|
+
var element = _iterator__ex2g4s.v();
|
|
182
182
|
if (predicate(element)) {
|
|
183
|
-
destination.
|
|
183
|
+
destination.e1(element);
|
|
184
184
|
}
|
|
185
185
|
}
|
|
186
186
|
return destination;
|
|
@@ -199,7 +199,7 @@
|
|
|
199
199
|
while (inductionVariable < last) {
|
|
200
200
|
var element = tmp0[inductionVariable];
|
|
201
201
|
inductionVariable = inductionVariable + 1 | 0;
|
|
202
|
-
if (p1.
|
|
202
|
+
if (p1.m().equals(element)) {
|
|
203
203
|
tmp$ret$1 = true;
|
|
204
204
|
break $l$block;
|
|
205
205
|
}
|
|
@@ -225,7 +225,7 @@
|
|
|
225
225
|
var CardName_HIDDEN_instance;
|
|
226
226
|
function getShortName($this) {
|
|
227
227
|
var tmp;
|
|
228
|
-
switch ($this.
|
|
228
|
+
switch ($this.a1_1) {
|
|
229
229
|
case 0:
|
|
230
230
|
tmp = 'A';
|
|
231
231
|
break;
|
|
@@ -296,23 +296,23 @@
|
|
|
296
296
|
}
|
|
297
297
|
function Companion() {
|
|
298
298
|
}
|
|
299
|
-
protoOf(Companion).
|
|
299
|
+
protoOf(Companion).s64 = function (suit, number) {
|
|
300
300
|
return new GameCard(getNumber(Companion_instance_0, getName(Companion_instance_0, number), suit));
|
|
301
301
|
};
|
|
302
|
-
protoOf(Companion).
|
|
302
|
+
protoOf(Companion).t64 = function (suit, cardNumber) {
|
|
303
303
|
return new GameCard(getNumber(Companion_instance_0, cardNumber, suit));
|
|
304
304
|
};
|
|
305
|
-
protoOf(Companion).
|
|
305
|
+
protoOf(Companion).u64 = function (index) {
|
|
306
306
|
return new GameCard(index);
|
|
307
307
|
};
|
|
308
|
-
protoOf(Companion).
|
|
308
|
+
protoOf(Companion).v64 = function (position, playerIndex, previousHiddenCardWithMaxIndex, reverse) {
|
|
309
309
|
var tmp;
|
|
310
310
|
if (previousHiddenCardWithMaxIndex == null) {
|
|
311
311
|
tmp = null;
|
|
312
312
|
} else {
|
|
313
313
|
// Inline function 'kotlin.takeIf' call
|
|
314
314
|
var tmp_0;
|
|
315
|
-
if (previousHiddenCardWithMaxIndex.
|
|
315
|
+
if (previousHiddenCardWithMaxIndex.w64()) {
|
|
316
316
|
tmp_0 = previousHiddenCardWithMaxIndex;
|
|
317
317
|
} else {
|
|
318
318
|
tmp_0 = null;
|
|
@@ -320,8 +320,8 @@
|
|
|
320
320
|
tmp = tmp_0;
|
|
321
321
|
}
|
|
322
322
|
var tmp1_safe_receiver = tmp;
|
|
323
|
-
var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.
|
|
324
|
-
var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : Companion_instance_0.
|
|
323
|
+
var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.q64_1;
|
|
324
|
+
var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : Companion_instance_0.d65(tmp2_safe_receiver, playerIndex, reverse);
|
|
325
325
|
var tmp_1;
|
|
326
326
|
if (tmp3_safe_receiver == null) {
|
|
327
327
|
tmp_1 = null;
|
|
@@ -340,10 +340,10 @@
|
|
|
340
340
|
var index = tmp_2;
|
|
341
341
|
return new GameCard(index);
|
|
342
342
|
};
|
|
343
|
-
protoOf(Companion).
|
|
343
|
+
protoOf(Companion).e65 = function (position, playerIndex, previousHiddenCardWithMaxIndex, reverse, $super) {
|
|
344
344
|
previousHiddenCardWithMaxIndex = previousHiddenCardWithMaxIndex === VOID ? null : previousHiddenCardWithMaxIndex;
|
|
345
345
|
reverse = reverse === VOID ? false : reverse;
|
|
346
|
-
return $super === VOID ? this.
|
|
346
|
+
return $super === VOID ? this.v64(position, playerIndex, previousHiddenCardWithMaxIndex, reverse) : $super.v64.call(this, position, playerIndex, previousHiddenCardWithMaxIndex, reverse);
|
|
347
347
|
};
|
|
348
348
|
var Companion_instance;
|
|
349
349
|
function Companion_getInstance() {
|
|
@@ -354,7 +354,7 @@
|
|
|
354
354
|
}
|
|
355
355
|
function getCardNumber($this, number) {
|
|
356
356
|
var tmp;
|
|
357
|
-
switch (number.
|
|
357
|
+
switch (number.a1_1) {
|
|
358
358
|
case 12:
|
|
359
359
|
tmp = 0;
|
|
360
360
|
break;
|
|
@@ -447,7 +447,7 @@
|
|
|
447
447
|
return tmp;
|
|
448
448
|
}
|
|
449
449
|
function _get_isShirt__vd98rp($this) {
|
|
450
|
-
return $this.
|
|
450
|
+
return $this.q64_1 >= 150 && $this.q64_1 <= 202;
|
|
451
451
|
}
|
|
452
452
|
function CardName(name, ordinal) {
|
|
453
453
|
Enum.call(this, name, ordinal);
|
|
@@ -456,14 +456,14 @@
|
|
|
456
456
|
return getShortName(this);
|
|
457
457
|
};
|
|
458
458
|
function Companion_0() {
|
|
459
|
-
this.
|
|
460
|
-
this.
|
|
461
|
-
this.
|
|
462
|
-
this.
|
|
463
|
-
this.
|
|
464
|
-
this.
|
|
465
|
-
}
|
|
466
|
-
protoOf(Companion_0).
|
|
459
|
+
this.x64_1 = -1;
|
|
460
|
+
this.y64_1 = 13;
|
|
461
|
+
this.z64_1 = 52;
|
|
462
|
+
this.a65_1 = 150;
|
|
463
|
+
this.b65_1 = 53;
|
|
464
|
+
this.c65_1 = 999;
|
|
465
|
+
}
|
|
466
|
+
protoOf(Companion_0).d65 = function (_this__u8e3s4, playerIndex, reverse) {
|
|
467
467
|
var tmp;
|
|
468
468
|
if (reverse) {
|
|
469
469
|
tmp = _this__u8e3s4 + (53 + imul(playerIndex, 14) | 0) | 0;
|
|
@@ -533,84 +533,83 @@
|
|
|
533
533
|
return CardName_HIDDEN_instance;
|
|
534
534
|
}
|
|
535
535
|
function GameCard(index) {
|
|
536
|
-
this.
|
|
536
|
+
this.q64_1 = index;
|
|
537
537
|
}
|
|
538
|
-
protoOf(GameCard).
|
|
538
|
+
protoOf(GameCard).f65 = function () {
|
|
539
539
|
var tmp;
|
|
540
|
-
var containsArg = this.
|
|
540
|
+
var containsArg = this.q64_1;
|
|
541
541
|
if (0 <= containsArg ? containsArg <= 13 : false) {
|
|
542
542
|
tmp = Suit_DIAMOND_getInstance();
|
|
543
543
|
} else {
|
|
544
|
-
if (this.
|
|
544
|
+
if (this.q64_1 <= 26) {
|
|
545
545
|
tmp = Suit_SPADE_getInstance();
|
|
546
546
|
} else {
|
|
547
|
-
if (this.
|
|
547
|
+
if (this.q64_1 <= 39) {
|
|
548
548
|
tmp = Suit_HEART_getInstance();
|
|
549
549
|
} else {
|
|
550
|
-
if (this.
|
|
550
|
+
if (this.q64_1 <= 52) {
|
|
551
551
|
tmp = Suit_CLUB_getInstance();
|
|
552
552
|
} else {
|
|
553
|
-
throw IllegalStateException_init_$Create$('Invalid suitCard in Card.getValue() ' + this.
|
|
553
|
+
throw IllegalStateException_init_$Create$('Invalid suitCard in Card.getValue() ' + this.q64_1);
|
|
554
554
|
}
|
|
555
555
|
}
|
|
556
556
|
}
|
|
557
557
|
}
|
|
558
558
|
return tmp;
|
|
559
559
|
};
|
|
560
|
-
protoOf(GameCard).
|
|
560
|
+
protoOf(GameCard).r64 = function () {
|
|
561
561
|
var tmp;
|
|
562
|
-
if (this.
|
|
562
|
+
if (this.w64()) {
|
|
563
563
|
tmp = -1;
|
|
564
564
|
} else {
|
|
565
|
-
tmp = this.
|
|
565
|
+
tmp = this.q64_1 - imul(13, getIndex(this.f65())) | 0;
|
|
566
566
|
}
|
|
567
567
|
return tmp;
|
|
568
568
|
};
|
|
569
|
-
protoOf(GameCard).
|
|
570
|
-
return this.
|
|
569
|
+
protoOf(GameCard).m = function () {
|
|
570
|
+
return this.w64() ? CardName_HIDDEN_getInstance() : getName(Companion_instance_0, this.r64());
|
|
571
571
|
};
|
|
572
|
-
protoOf(GameCard).
|
|
573
|
-
return !_get_isShirt__vd98rp(this) && !this.
|
|
572
|
+
protoOf(GameCard).g65 = function () {
|
|
573
|
+
return !_get_isShirt__vd98rp(this) && !this.w64();
|
|
574
574
|
};
|
|
575
|
-
protoOf(GameCard).
|
|
576
|
-
return this.
|
|
575
|
+
protoOf(GameCard).h65 = function () {
|
|
576
|
+
return this.q64_1 === 999;
|
|
577
577
|
};
|
|
578
|
-
protoOf(GameCard).
|
|
579
|
-
return this.
|
|
578
|
+
protoOf(GameCard).w64 = function () {
|
|
579
|
+
return this.q64_1 >= 53 && this.q64_1 <= 105;
|
|
580
580
|
};
|
|
581
581
|
protoOf(GameCard).toString = function () {
|
|
582
|
-
return 'GameCard' + this.
|
|
582
|
+
return 'GameCard' + this.i65();
|
|
583
583
|
};
|
|
584
|
-
protoOf(GameCard).
|
|
585
|
-
return '{' + this.
|
|
584
|
+
protoOf(GameCard).i65 = function () {
|
|
585
|
+
return '{' + this.j65() + ', ' + this.q64_1 + '}';
|
|
586
586
|
};
|
|
587
|
-
protoOf(GameCard).
|
|
588
|
-
if (this.
|
|
587
|
+
protoOf(GameCard).j65 = function () {
|
|
588
|
+
if (this.h65()) {
|
|
589
589
|
return 'stub';
|
|
590
590
|
}
|
|
591
|
-
if (this.
|
|
591
|
+
if (this.w64()) {
|
|
592
592
|
return 'hidden';
|
|
593
593
|
}
|
|
594
594
|
if (_get_isShirt__vd98rp(this)) {
|
|
595
595
|
return 'shirt';
|
|
596
596
|
}
|
|
597
|
-
return this.
|
|
597
|
+
return this.f65().toString() + this.m().toString();
|
|
598
598
|
};
|
|
599
599
|
protoOf(GameCard).hashCode = function () {
|
|
600
|
-
return this.
|
|
600
|
+
return this.q64_1;
|
|
601
601
|
};
|
|
602
602
|
protoOf(GameCard).equals = function (other) {
|
|
603
603
|
if (this === other)
|
|
604
604
|
return true;
|
|
605
605
|
if (!(other instanceof GameCard))
|
|
606
606
|
return false;
|
|
607
|
-
|
|
608
|
-
if (!(this.t5d_1 === tmp0_other_with_cast.t5d_1))
|
|
607
|
+
if (!(this.q64_1 === other.q64_1))
|
|
609
608
|
return false;
|
|
610
609
|
return true;
|
|
611
610
|
};
|
|
612
611
|
function _get_$cachedSerializer__te6jhj($this) {
|
|
613
|
-
return $this.
|
|
612
|
+
return $this.k65_1.o1();
|
|
614
613
|
}
|
|
615
614
|
function Suit$Companion$_anonymous__cbm2iq() {
|
|
616
615
|
return createSimpleEnumSerializer('io.raspberryapps.card_game.core.data.models.cards.Suit', values());
|
|
@@ -621,7 +620,7 @@
|
|
|
621
620
|
var Suit_CLUB_instance;
|
|
622
621
|
function getSuitEmoji($this) {
|
|
623
622
|
var tmp;
|
|
624
|
-
switch ($this.
|
|
623
|
+
switch ($this.a1_1) {
|
|
625
624
|
case 0:
|
|
626
625
|
tmp = '\u2666\uFE0F';
|
|
627
626
|
break;
|
|
@@ -652,13 +651,13 @@
|
|
|
652
651
|
Companion_instance_1 = this;
|
|
653
652
|
var tmp = this;
|
|
654
653
|
var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
655
|
-
tmp.
|
|
654
|
+
tmp.k65_1 = lazy(tmp_0, Suit$Companion$_anonymous__cbm2iq);
|
|
656
655
|
}
|
|
657
|
-
protoOf(Companion_1).
|
|
656
|
+
protoOf(Companion_1).r1c = function () {
|
|
658
657
|
return _get_$cachedSerializer__te6jhj(this);
|
|
659
658
|
};
|
|
660
|
-
protoOf(Companion_1).
|
|
661
|
-
return this.
|
|
659
|
+
protoOf(Companion_1).x10 = function (typeParamsSerializers) {
|
|
660
|
+
return this.r1c();
|
|
662
661
|
};
|
|
663
662
|
var Companion_instance_1;
|
|
664
663
|
function Companion_getInstance_1() {
|
|
@@ -703,7 +702,7 @@
|
|
|
703
702
|
}
|
|
704
703
|
function getIndex(_this__u8e3s4) {
|
|
705
704
|
var tmp;
|
|
706
|
-
switch (_this__u8e3s4.
|
|
705
|
+
switch (_this__u8e3s4.a1_1) {
|
|
707
706
|
case 0:
|
|
708
707
|
tmp = 0;
|
|
709
708
|
break;
|
|
@@ -753,29 +752,29 @@
|
|
|
753
752
|
}
|
|
754
753
|
function getRandomOrgCards($this, leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundsCount, userData, signed, $completion) {
|
|
755
754
|
var tmp = new $getRandomOrgCardsCOROUTINE$($this, leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundsCount, userData, signed, $completion);
|
|
756
|
-
tmp.
|
|
757
|
-
tmp.
|
|
758
|
-
return tmp.
|
|
755
|
+
tmp.g9_1 = Unit_instance;
|
|
756
|
+
tmp.h9_1 = null;
|
|
757
|
+
return tmp.m9();
|
|
759
758
|
}
|
|
760
759
|
function normalizeCards($this, cards, leftCardIndexForEachSuit) {
|
|
761
|
-
var oneSuitCount = cards.
|
|
760
|
+
var oneSuitCount = cards.g1() / get_entries().g1() | 0;
|
|
762
761
|
// Inline function 'kotlin.collections.map' call
|
|
763
762
|
// Inline function 'kotlin.collections.mapTo' call
|
|
764
763
|
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(cards, 10));
|
|
765
|
-
var _iterator__ex2g4s = cards.
|
|
766
|
-
while (_iterator__ex2g4s.
|
|
767
|
-
var item = _iterator__ex2g4s.
|
|
764
|
+
var _iterator__ex2g4s = cards.t();
|
|
765
|
+
while (_iterator__ex2g4s.u()) {
|
|
766
|
+
var item = _iterator__ex2g4s.v();
|
|
768
767
|
var previousSuitNumber = item / oneSuitCount | 0;
|
|
769
768
|
var cardIndexShift = imul(leftCardIndexForEachSuit, previousSuitNumber + 1 | 0);
|
|
770
769
|
var newIndex = item + cardIndexShift | 0;
|
|
771
|
-
destination.
|
|
770
|
+
destination.e1(newIndex);
|
|
772
771
|
}
|
|
773
772
|
var newIndexes = destination;
|
|
774
773
|
return newIndexes;
|
|
775
774
|
}
|
|
776
775
|
function Companion_2() {
|
|
777
776
|
}
|
|
778
|
-
protoOf(Companion_2).
|
|
777
|
+
protoOf(Companion_2).i66 = function (randomPoolProvider, logger) {
|
|
779
778
|
var tmp0_random = new SecureRandom(logger);
|
|
780
779
|
return new CardsDealerProviderImpl(tmp0_random, randomPoolProvider, logger);
|
|
781
780
|
};
|
|
@@ -785,40 +784,40 @@
|
|
|
785
784
|
}
|
|
786
785
|
function $createNewShuffledCardDeckCOROUTINE$(_this__u8e3s4, leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundCountForGame, userData, provider, resultContinuation) {
|
|
787
786
|
CoroutineImpl.call(this, resultContinuation);
|
|
788
|
-
this.
|
|
789
|
-
this.
|
|
790
|
-
this.
|
|
791
|
-
this.
|
|
792
|
-
this.
|
|
793
|
-
this.
|
|
794
|
-
}
|
|
795
|
-
protoOf($createNewShuffledCardDeckCOROUTINE$).
|
|
796
|
-
var suspendResult = this.
|
|
787
|
+
this.r66_1 = _this__u8e3s4;
|
|
788
|
+
this.s66_1 = leftCardIndexForEachSuit;
|
|
789
|
+
this.t66_1 = rightCardIndexForEachSuit;
|
|
790
|
+
this.u66_1 = approximateRoundCountForGame;
|
|
791
|
+
this.v66_1 = userData;
|
|
792
|
+
this.w66_1 = provider;
|
|
793
|
+
}
|
|
794
|
+
protoOf($createNewShuffledCardDeckCOROUTINE$).m9 = function () {
|
|
795
|
+
var suspendResult = this.g9_1;
|
|
797
796
|
$sm: do
|
|
798
797
|
try {
|
|
799
|
-
var tmp = this.
|
|
798
|
+
var tmp = this.e9_1;
|
|
800
799
|
switch (tmp) {
|
|
801
800
|
case 0:
|
|
802
|
-
this.
|
|
803
|
-
var tmp0 = this.
|
|
801
|
+
this.f9_1 = 4;
|
|
802
|
+
var tmp0 = this.w66_1.a1_1;
|
|
804
803
|
if (tmp0 === 0) {
|
|
805
804
|
var tmp_0 = this;
|
|
806
|
-
var it = this.
|
|
807
|
-
tmp_0.
|
|
808
|
-
this.
|
|
805
|
+
var it = this.r66_1.l65(this.s66_1, this.t66_1);
|
|
806
|
+
tmp_0.x66_1 = this.r66_1.p65(it);
|
|
807
|
+
this.e9_1 = 3;
|
|
809
808
|
continue $sm;
|
|
810
809
|
} else {
|
|
811
810
|
if (tmp0 === 1) {
|
|
812
|
-
this.
|
|
813
|
-
suspendResult = getRandomOrgCards(this.
|
|
811
|
+
this.e9_1 = 2;
|
|
812
|
+
suspendResult = getRandomOrgCards(this.r66_1, this.s66_1, this.t66_1, this.u66_1, this.v66_1, false, this);
|
|
814
813
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
815
814
|
return suspendResult;
|
|
816
815
|
}
|
|
817
816
|
continue $sm;
|
|
818
817
|
} else {
|
|
819
818
|
if (tmp0 === 2) {
|
|
820
|
-
this.
|
|
821
|
-
suspendResult = getRandomOrgCards(this.
|
|
819
|
+
this.e9_1 = 1;
|
|
820
|
+
suspendResult = getRandomOrgCards(this.r66_1, this.s66_1, this.t66_1, this.u66_1, this.v66_1, true, this);
|
|
822
821
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
823
822
|
return suspendResult;
|
|
824
823
|
}
|
|
@@ -832,84 +831,84 @@
|
|
|
832
831
|
|
|
833
832
|
break;
|
|
834
833
|
case 1:
|
|
835
|
-
this.
|
|
836
|
-
this.
|
|
834
|
+
this.x66_1 = suspendResult;
|
|
835
|
+
this.e9_1 = 3;
|
|
837
836
|
continue $sm;
|
|
838
837
|
case 2:
|
|
839
|
-
this.
|
|
840
|
-
this.
|
|
838
|
+
this.x66_1 = suspendResult;
|
|
839
|
+
this.e9_1 = 3;
|
|
841
840
|
continue $sm;
|
|
842
841
|
case 3:
|
|
843
|
-
return this.
|
|
842
|
+
return this.x66_1;
|
|
844
843
|
case 4:
|
|
845
|
-
throw this.
|
|
844
|
+
throw this.h9_1;
|
|
846
845
|
}
|
|
847
846
|
} catch ($p) {
|
|
848
847
|
var e = $p;
|
|
849
|
-
if (this.
|
|
848
|
+
if (this.f9_1 === 4) {
|
|
850
849
|
throw e;
|
|
851
850
|
} else {
|
|
852
|
-
this.
|
|
853
|
-
this.
|
|
851
|
+
this.e9_1 = this.f9_1;
|
|
852
|
+
this.h9_1 = e;
|
|
854
853
|
}
|
|
855
854
|
}
|
|
856
855
|
while (true);
|
|
857
856
|
};
|
|
858
857
|
function $getRandomOrgCardsCOROUTINE$(_this__u8e3s4, leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundsCount, userData, signed, resultContinuation) {
|
|
859
858
|
CoroutineImpl.call(this, resultContinuation);
|
|
860
|
-
this.
|
|
861
|
-
this.
|
|
862
|
-
this.
|
|
863
|
-
this.
|
|
864
|
-
this.
|
|
865
|
-
this.
|
|
866
|
-
}
|
|
867
|
-
protoOf($getRandomOrgCardsCOROUTINE$).
|
|
868
|
-
var suspendResult = this.
|
|
859
|
+
this.b66_1 = _this__u8e3s4;
|
|
860
|
+
this.c66_1 = leftCardIndexForEachSuit;
|
|
861
|
+
this.d66_1 = rightCardIndexForEachSuit;
|
|
862
|
+
this.e66_1 = approximateRoundsCount;
|
|
863
|
+
this.f66_1 = userData;
|
|
864
|
+
this.g66_1 = signed;
|
|
865
|
+
}
|
|
866
|
+
protoOf($getRandomOrgCardsCOROUTINE$).m9 = function () {
|
|
867
|
+
var suspendResult = this.g9_1;
|
|
869
868
|
$sm: do
|
|
870
869
|
try {
|
|
871
|
-
var tmp = this.
|
|
870
|
+
var tmp = this.e9_1;
|
|
872
871
|
switch (tmp) {
|
|
873
872
|
case 0:
|
|
874
|
-
this.
|
|
875
|
-
var cardsCount = this.
|
|
876
|
-
var tmp0_$this = this.
|
|
873
|
+
this.f9_1 = 5;
|
|
874
|
+
var cardsCount = this.b66_1.s65(this.c66_1, this.d66_1);
|
|
875
|
+
var tmp0_$this = this.b66_1.z66_1;
|
|
877
876
|
var tmp1_max = cardsCount - 1 | 0;
|
|
878
|
-
this.
|
|
879
|
-
suspendResult = tmp0_$this.
|
|
877
|
+
this.e9_1 = 1;
|
|
878
|
+
suspendResult = tmp0_$this.k5z(this.e66_1, this.f66_1, 0, tmp1_max, cardsCount, this.g66_1, VOID, this);
|
|
880
879
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
881
880
|
return suspendResult;
|
|
882
881
|
}
|
|
883
882
|
|
|
884
|
-
this.
|
|
883
|
+
this.e9_1 = 2;
|
|
885
884
|
continue $sm;
|
|
886
885
|
case 1:
|
|
887
|
-
var unboxed = suspendResult.
|
|
886
|
+
var unboxed = suspendResult.hm_1;
|
|
888
887
|
suspendResult = new Result(unboxed);
|
|
889
|
-
this.
|
|
888
|
+
this.e9_1 = 2;
|
|
890
889
|
continue $sm;
|
|
891
890
|
case 2:
|
|
892
|
-
var result = suspendResult.
|
|
891
|
+
var result = suspendResult.hm_1;
|
|
893
892
|
if (_Result___get_isSuccess__impl__sndoy8(result)) {
|
|
894
893
|
var tmp_0 = this;
|
|
895
894
|
throwOnFailure(result);
|
|
896
895
|
var tmp_1 = _Result___get_value__impl__bjfvqg(result);
|
|
897
896
|
var tmp2_cards = ((tmp_1 == null ? true : !(tmp_1 == null)) ? tmp_1 : THROW_CCE()).cards;
|
|
898
|
-
var this_0 = normalizeCards(this.
|
|
897
|
+
var this_0 = normalizeCards(this.b66_1, tmp2_cards, this.c66_1);
|
|
899
898
|
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
900
|
-
var _iterator__ex2g4s = this_0.
|
|
901
|
-
while (_iterator__ex2g4s.
|
|
902
|
-
var item = _iterator__ex2g4s.
|
|
903
|
-
destination.
|
|
899
|
+
var _iterator__ex2g4s = this_0.t();
|
|
900
|
+
while (_iterator__ex2g4s.u()) {
|
|
901
|
+
var item = _iterator__ex2g4s.v();
|
|
902
|
+
destination.e1(Companion_instance.u64(item));
|
|
904
903
|
}
|
|
905
|
-
tmp_0.
|
|
906
|
-
this.
|
|
904
|
+
tmp_0.h66_1 = destination;
|
|
905
|
+
this.e9_1 = 4;
|
|
907
906
|
continue $sm;
|
|
908
907
|
} else {
|
|
909
908
|
var exception = Result__exceptionOrNull_impl_p6xea9(result);
|
|
910
|
-
this.
|
|
911
|
-
this.
|
|
912
|
-
suspendResult = this.
|
|
909
|
+
this.b66_1.a67_1.v('CardsDealerProvider', 'getRandomOrgCards: ' + (exception == null ? null : exception.message), exception);
|
|
910
|
+
this.e9_1 = 3;
|
|
911
|
+
suspendResult = this.b66_1.m65(this.c66_1, this.d66_1, this.e66_1, this.f66_1, CardsRandomProvider_CUSTOM_getInstance(), this);
|
|
913
912
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
914
913
|
return suspendResult;
|
|
915
914
|
}
|
|
@@ -917,51 +916,51 @@
|
|
|
917
916
|
}
|
|
918
917
|
|
|
919
918
|
case 3:
|
|
920
|
-
this.
|
|
921
|
-
this.
|
|
919
|
+
this.h66_1 = suspendResult;
|
|
920
|
+
this.e9_1 = 4;
|
|
922
921
|
continue $sm;
|
|
923
922
|
case 4:
|
|
924
|
-
return this.
|
|
923
|
+
return this.h66_1;
|
|
925
924
|
case 5:
|
|
926
|
-
throw this.
|
|
925
|
+
throw this.h9_1;
|
|
927
926
|
}
|
|
928
927
|
} catch ($p) {
|
|
929
928
|
var e = $p;
|
|
930
|
-
if (this.
|
|
929
|
+
if (this.f9_1 === 5) {
|
|
931
930
|
throw e;
|
|
932
931
|
} else {
|
|
933
|
-
this.
|
|
934
|
-
this.
|
|
932
|
+
this.e9_1 = this.f9_1;
|
|
933
|
+
this.h9_1 = e;
|
|
935
934
|
}
|
|
936
935
|
}
|
|
937
936
|
while (true);
|
|
938
937
|
};
|
|
939
938
|
function CardsDealerProviderImpl(random, randomPoolProvider, logger) {
|
|
940
|
-
this.
|
|
941
|
-
this.
|
|
942
|
-
this.
|
|
939
|
+
this.y66_1 = random;
|
|
940
|
+
this.z66_1 = randomPoolProvider;
|
|
941
|
+
this.a67_1 = logger;
|
|
943
942
|
}
|
|
944
|
-
protoOf(CardsDealerProviderImpl).
|
|
943
|
+
protoOf(CardsDealerProviderImpl).l65 = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit) {
|
|
945
944
|
// Inline function 'kotlin.collections.flatMap' call
|
|
946
945
|
var tmp0 = get_entries();
|
|
947
946
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
948
947
|
var destination = ArrayList_init_$Create$();
|
|
949
|
-
var _iterator__ex2g4s = tmp0.
|
|
950
|
-
while (_iterator__ex2g4s.
|
|
951
|
-
var element = _iterator__ex2g4s.
|
|
948
|
+
var _iterator__ex2g4s = tmp0.t();
|
|
949
|
+
while (_iterator__ex2g4s.u()) {
|
|
950
|
+
var element = _iterator__ex2g4s.v();
|
|
952
951
|
// Inline function 'kotlin.collections.map' call
|
|
953
|
-
var this_0 = this.
|
|
952
|
+
var this_0 = this.b67(leftCardIndexForEachSuit, rightCardIndexForEachSuit);
|
|
954
953
|
// Inline function 'kotlin.collections.mapTo' call
|
|
955
954
|
var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
956
|
-
var inductionVariable = this_0.
|
|
957
|
-
var last = this_0.
|
|
955
|
+
var inductionVariable = this_0.r1_1;
|
|
956
|
+
var last = this_0.s1_1;
|
|
958
957
|
if (inductionVariable <= last)
|
|
959
958
|
do {
|
|
960
959
|
var item = inductionVariable;
|
|
961
960
|
inductionVariable = inductionVariable + 1 | 0;
|
|
962
961
|
var it = item;
|
|
963
|
-
var tmp$ret$0 = Companion_instance.
|
|
964
|
-
destination_0.
|
|
962
|
+
var tmp$ret$0 = Companion_instance.s64(element, it);
|
|
963
|
+
destination_0.e1(tmp$ret$0);
|
|
965
964
|
}
|
|
966
965
|
while (!(item === last));
|
|
967
966
|
var list = destination_0;
|
|
@@ -969,38 +968,38 @@
|
|
|
969
968
|
}
|
|
970
969
|
return destination;
|
|
971
970
|
};
|
|
972
|
-
protoOf(CardsDealerProviderImpl).
|
|
971
|
+
protoOf(CardsDealerProviderImpl).b67 = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit) {
|
|
973
972
|
return until(leftCardIndexForEachSuit, 13 - rightCardIndexForEachSuit | 0);
|
|
974
973
|
};
|
|
975
|
-
protoOf(CardsDealerProviderImpl).
|
|
974
|
+
protoOf(CardsDealerProviderImpl).s65 = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit) {
|
|
976
975
|
// Inline function 'kotlin.collections.sumOf' call
|
|
977
976
|
var sum = 0;
|
|
978
|
-
var _iterator__ex2g4s = get_entries().
|
|
979
|
-
while (_iterator__ex2g4s.
|
|
980
|
-
var element = _iterator__ex2g4s.
|
|
977
|
+
var _iterator__ex2g4s = get_entries().t();
|
|
978
|
+
while (_iterator__ex2g4s.u()) {
|
|
979
|
+
var element = _iterator__ex2g4s.v();
|
|
981
980
|
var tmp = sum;
|
|
982
|
-
sum = tmp + count(this.
|
|
981
|
+
sum = tmp + count(this.b67(leftCardIndexForEachSuit, rightCardIndexForEachSuit)) | 0;
|
|
983
982
|
}
|
|
984
983
|
return sum;
|
|
985
984
|
};
|
|
986
|
-
protoOf(CardsDealerProviderImpl).
|
|
985
|
+
protoOf(CardsDealerProviderImpl).m65 = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundCountForGame, userData, provider, $completion) {
|
|
987
986
|
var tmp = new $createNewShuffledCardDeckCOROUTINE$(this, leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundCountForGame, userData, provider, $completion);
|
|
988
|
-
tmp.
|
|
989
|
-
tmp.
|
|
990
|
-
return tmp.
|
|
987
|
+
tmp.g9_1 = Unit_instance;
|
|
988
|
+
tmp.h9_1 = null;
|
|
989
|
+
return tmp.m9();
|
|
991
990
|
};
|
|
992
|
-
protoOf(CardsDealerProviderImpl).
|
|
991
|
+
protoOf(CardsDealerProviderImpl).n65 = function (count, cards) {
|
|
993
992
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
994
993
|
// Inline function 'kotlin.apply' call
|
|
995
994
|
var this_0 = ArrayList_init_$Create$();
|
|
996
995
|
$l$block: {
|
|
997
|
-
var _iterator__ex2g4s = cards.
|
|
998
|
-
$l$loop_0: while (_iterator__ex2g4s.
|
|
999
|
-
var card = _iterator__ex2g4s.
|
|
1000
|
-
if (this_0.
|
|
996
|
+
var _iterator__ex2g4s = cards.t();
|
|
997
|
+
$l$loop_0: while (_iterator__ex2g4s.u()) {
|
|
998
|
+
var card = _iterator__ex2g4s.v();
|
|
999
|
+
if (this_0.g1() === count) {
|
|
1001
1000
|
break $l$block;
|
|
1002
1001
|
}
|
|
1003
|
-
var hasSimilarCard = this_0.
|
|
1002
|
+
var hasSimilarCard = this_0.m2(card);
|
|
1004
1003
|
if (hasSimilarCard) {
|
|
1005
1004
|
continue $l$loop_0;
|
|
1006
1005
|
}
|
|
@@ -1017,10 +1016,10 @@
|
|
|
1017
1016
|
tmp$ret$2 = false;
|
|
1018
1017
|
break $l$block_1;
|
|
1019
1018
|
}
|
|
1020
|
-
var _iterator__ex2g4s_0 = this_0.
|
|
1021
|
-
while (_iterator__ex2g4s_0.
|
|
1022
|
-
var element = _iterator__ex2g4s_0.
|
|
1023
|
-
if (element.
|
|
1019
|
+
var _iterator__ex2g4s_0 = this_0.t();
|
|
1020
|
+
while (_iterator__ex2g4s_0.u()) {
|
|
1021
|
+
var element = _iterator__ex2g4s_0.v();
|
|
1022
|
+
if (element.r64() === card.r64()) {
|
|
1024
1023
|
tmp$ret$2 = true;
|
|
1025
1024
|
break $l$block_1;
|
|
1026
1025
|
}
|
|
@@ -1030,12 +1029,12 @@
|
|
|
1030
1029
|
if (tmp$ret$2) {
|
|
1031
1030
|
continue $l$loop_0;
|
|
1032
1031
|
}
|
|
1033
|
-
this_0.
|
|
1032
|
+
this_0.e1(card);
|
|
1034
1033
|
}
|
|
1035
1034
|
}
|
|
1036
1035
|
return this_0;
|
|
1037
1036
|
};
|
|
1038
|
-
protoOf(CardsDealerProviderImpl).
|
|
1037
|
+
protoOf(CardsDealerProviderImpl).o65 = function (cards, times) {
|
|
1039
1038
|
// Inline function 'kotlin.let' call
|
|
1040
1039
|
var shuffled = toMutableList(cards);
|
|
1041
1040
|
var inductionVariable = 0;
|
|
@@ -1043,72 +1042,72 @@
|
|
|
1043
1042
|
do {
|
|
1044
1043
|
var i = inductionVariable;
|
|
1045
1044
|
inductionVariable = inductionVariable + 1 | 0;
|
|
1046
|
-
shuffled = this.
|
|
1045
|
+
shuffled = this.y66_1.n64(shuffled);
|
|
1047
1046
|
}
|
|
1048
1047
|
while (inductionVariable < times);
|
|
1049
1048
|
return shuffled;
|
|
1050
1049
|
};
|
|
1051
|
-
protoOf(CardsDealerProviderImpl).
|
|
1052
|
-
return toList(overhand(riffle(toMutableList(cards), times, this.
|
|
1050
|
+
protoOf(CardsDealerProviderImpl).q65 = function (cards, times) {
|
|
1051
|
+
return toList(overhand(riffle(toMutableList(cards), times, this.y66_1), times, this.y66_1));
|
|
1053
1052
|
};
|
|
1054
1053
|
function Companion_3() {
|
|
1055
1054
|
}
|
|
1056
|
-
protoOf(Companion_3).
|
|
1055
|
+
protoOf(Companion_3).c67 = function () {
|
|
1057
1056
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
1058
1057
|
// Inline function 'kotlin.apply' call
|
|
1059
1058
|
var this_0 = ArrayList_init_$Create$();
|
|
1060
|
-
this_0.
|
|
1061
|
-
this_0.
|
|
1062
|
-
this_0.
|
|
1063
|
-
this_0.
|
|
1064
|
-
this_0.
|
|
1059
|
+
this_0.i1(listOf([Companion_instance.t64(Suit_DIAMOND_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.t64(Suit_CLUB_getInstance(), CardName_NINE_getInstance()), Companion_instance.t64(Suit_CLUB_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.t64(Suit_CLUB_getInstance(), CardName_TEN_getInstance()), Companion_instance.t64(Suit_HEART_getInstance(), CardName_JACK_getInstance()), Companion_instance.t64(Suit_HEART_getInstance(), CardName_KING_getInstance())]));
|
|
1060
|
+
this_0.i1(listOf([Companion_instance.t64(Suit_CLUB_getInstance(), CardName_JACK_getInstance()), Companion_instance.t64(Suit_SPADE_getInstance(), CardName_ACE_getInstance()), Companion_instance.t64(Suit_DIAMOND_getInstance(), CardName_NINE_getInstance()), Companion_instance.t64(Suit_DIAMOND_getInstance(), CardName_TEN_getInstance()), Companion_instance.t64(Suit_DIAMOND_getInstance(), CardName_JACK_getInstance()), Companion_instance.t64(Suit_HEART_getInstance(), CardName_EIGHT_getInstance())]));
|
|
1061
|
+
this_0.i1(listOf([Companion_instance.t64(Suit_CLUB_getInstance(), CardName_QUEEN_getInstance()), Companion_instance.t64(Suit_HEART_getInstance(), CardName_ACE_getInstance()), Companion_instance.t64(Suit_HEART_getInstance(), CardName_QUEEN_getInstance()), Companion_instance.t64(Suit_HEART_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.t64(Suit_SPADE_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.t64(Suit_CLUB_getInstance(), CardName_KING_getInstance())]));
|
|
1062
|
+
this_0.i1(listOf([Companion_instance.t64(Suit_SPADE_getInstance(), CardName_EIGHT_getInstance()), Companion_instance.t64(Suit_SPADE_getInstance(), CardName_TEN_getInstance()), Companion_instance.t64(Suit_HEART_getInstance(), CardName_TEN_getInstance()), Companion_instance.t64(Suit_SPADE_getInstance(), CardName_JACK_getInstance()), Companion_instance.t64(Suit_DIAMOND_getInstance(), CardName_EIGHT_getInstance()), Companion_instance.t64(Suit_SPADE_getInstance(), CardName_QUEEN_getInstance())]));
|
|
1063
|
+
this_0.i1(listOf([Companion_instance.t64(Suit_DIAMOND_getInstance(), CardName_ACE_getInstance()), Companion_instance.t64(Suit_CLUB_getInstance(), CardName_EIGHT_getInstance()), Companion_instance.t64(Suit_DIAMOND_getInstance(), CardName_KING_getInstance()), Companion_instance.t64(Suit_SPADE_getInstance(), CardName_NINE_getInstance()), Companion_instance.t64(Suit_CLUB_getInstance(), CardName_ACE_getInstance()), Companion_instance.t64(Suit_SPADE_getInstance(), CardName_KING_getInstance()), Companion_instance.t64(Suit_DIAMOND_getInstance(), CardName_QUEEN_getInstance()), Companion_instance.t64(Suit_HEART_getInstance(), CardName_NINE_getInstance())]));
|
|
1065
1064
|
return this_0;
|
|
1066
1065
|
};
|
|
1067
|
-
protoOf(Companion_3).
|
|
1068
|
-
return listOf([Companion_instance.
|
|
1066
|
+
protoOf(Companion_3).d67 = function () {
|
|
1067
|
+
return listOf([Companion_instance.t64(Suit_CLUB_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.t64(Suit_HEART_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.t64(Suit_SPADE_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.t64(Suit_SPADE_getInstance(), CardName_EIGHT_getInstance())]);
|
|
1069
1068
|
};
|
|
1070
1069
|
var Companion_instance_3;
|
|
1071
1070
|
function Companion_getInstance_3() {
|
|
1072
1071
|
return Companion_instance_3;
|
|
1073
1072
|
}
|
|
1074
1073
|
function FakeCardsDealerProvider(cards, cardsForLot) {
|
|
1075
|
-
cards = cards === VOID ? Companion_instance_3.
|
|
1076
|
-
cardsForLot = cardsForLot === VOID ? Companion_instance_3.
|
|
1077
|
-
this.
|
|
1078
|
-
this.
|
|
1074
|
+
cards = cards === VOID ? Companion_instance_3.c67() : cards;
|
|
1075
|
+
cardsForLot = cardsForLot === VOID ? Companion_instance_3.d67() : cardsForLot;
|
|
1076
|
+
this.e67_1 = cards;
|
|
1077
|
+
this.f67_1 = cardsForLot;
|
|
1079
1078
|
}
|
|
1080
|
-
protoOf(FakeCardsDealerProvider).
|
|
1081
|
-
return this.
|
|
1079
|
+
protoOf(FakeCardsDealerProvider).l65 = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit) {
|
|
1080
|
+
return this.e67_1;
|
|
1082
1081
|
};
|
|
1083
|
-
protoOf(FakeCardsDealerProvider).
|
|
1084
|
-
return this.
|
|
1082
|
+
protoOf(FakeCardsDealerProvider).m65 = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundCountForGame, userData, provider, $completion) {
|
|
1083
|
+
return this.e67_1;
|
|
1085
1084
|
};
|
|
1086
|
-
protoOf(FakeCardsDealerProvider).
|
|
1087
|
-
return this.
|
|
1085
|
+
protoOf(FakeCardsDealerProvider).n65 = function (count, cards) {
|
|
1086
|
+
return this.f67_1;
|
|
1088
1087
|
};
|
|
1089
|
-
protoOf(FakeCardsDealerProvider).
|
|
1088
|
+
protoOf(FakeCardsDealerProvider).o65 = function (cards, times) {
|
|
1090
1089
|
return cards;
|
|
1091
1090
|
};
|
|
1092
|
-
protoOf(FakeCardsDealerProvider).
|
|
1091
|
+
protoOf(FakeCardsDealerProvider).q65 = function (cards, times) {
|
|
1093
1092
|
return cards;
|
|
1094
1093
|
};
|
|
1095
|
-
protoOf(FakeCardsDealerProvider).
|
|
1096
|
-
return this.
|
|
1094
|
+
protoOf(FakeCardsDealerProvider).s65 = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit) {
|
|
1095
|
+
return this.e67_1.g1();
|
|
1097
1096
|
};
|
|
1098
1097
|
function CombinationsCheckerProvider() {
|
|
1099
1098
|
}
|
|
1100
1099
|
function createCombination($this, cards, supportedCombinations) {
|
|
1101
|
-
var size = cards.
|
|
1102
|
-
if (supportedCombinations.
|
|
1100
|
+
var size = cards.g1();
|
|
1101
|
+
if (supportedCombinations.m2(size)) {
|
|
1103
1102
|
return cards;
|
|
1104
1103
|
}
|
|
1105
1104
|
var fromLongestCombinations = asReversed(sorted(supportedCombinations));
|
|
1106
1105
|
var tmp$ret$1;
|
|
1107
1106
|
$l$block: {
|
|
1108
1107
|
// Inline function 'kotlin.collections.first' call
|
|
1109
|
-
var _iterator__ex2g4s = fromLongestCombinations.
|
|
1110
|
-
while (_iterator__ex2g4s.
|
|
1111
|
-
var element = _iterator__ex2g4s.
|
|
1108
|
+
var _iterator__ex2g4s = fromLongestCombinations.t();
|
|
1109
|
+
while (_iterator__ex2g4s.u()) {
|
|
1110
|
+
var element = _iterator__ex2g4s.v();
|
|
1112
1111
|
if (element <= size) {
|
|
1113
1112
|
tmp$ret$1 = element;
|
|
1114
1113
|
break $l$block;
|
|
@@ -1120,23 +1119,23 @@
|
|
|
1120
1119
|
return takeLast(cards, longestCombinationSupport);
|
|
1121
1120
|
}
|
|
1122
1121
|
function sam$kotlin_Comparator$0(function_0) {
|
|
1123
|
-
this.
|
|
1122
|
+
this.l67_1 = function_0;
|
|
1124
1123
|
}
|
|
1125
|
-
protoOf(sam$kotlin_Comparator$0).
|
|
1126
|
-
return this.
|
|
1124
|
+
protoOf(sam$kotlin_Comparator$0).dd = function (a, b) {
|
|
1125
|
+
return this.l67_1(a, b);
|
|
1127
1126
|
};
|
|
1128
1127
|
protoOf(sam$kotlin_Comparator$0).compare = function (a, b) {
|
|
1129
|
-
return this.
|
|
1128
|
+
return this.dd(a, b);
|
|
1130
1129
|
};
|
|
1131
|
-
protoOf(sam$kotlin_Comparator$0).
|
|
1132
|
-
return this.
|
|
1130
|
+
protoOf(sam$kotlin_Comparator$0).s3 = function () {
|
|
1131
|
+
return this.l67_1;
|
|
1133
1132
|
};
|
|
1134
1133
|
protoOf(sam$kotlin_Comparator$0).equals = function (other) {
|
|
1135
1134
|
var tmp;
|
|
1136
1135
|
if (!(other == null) ? isInterface(other, Comparator) : false) {
|
|
1137
1136
|
var tmp_0;
|
|
1138
1137
|
if (!(other == null) ? isInterface(other, FunctionAdapter) : false) {
|
|
1139
|
-
tmp_0 = equals(this.
|
|
1138
|
+
tmp_0 = equals(this.s3(), other.s3());
|
|
1140
1139
|
} else {
|
|
1141
1140
|
tmp_0 = false;
|
|
1142
1141
|
}
|
|
@@ -1147,28 +1146,28 @@
|
|
|
1147
1146
|
return tmp;
|
|
1148
1147
|
};
|
|
1149
1148
|
protoOf(sam$kotlin_Comparator$0).hashCode = function () {
|
|
1150
|
-
return hashCode(this.
|
|
1149
|
+
return hashCode(this.s3());
|
|
1151
1150
|
};
|
|
1152
1151
|
function CombinationsCheckerProviderImpl$createCombinationsFromCardsInRow$lambda(a, b) {
|
|
1153
1152
|
// Inline function 'kotlin.comparisons.compareValuesBy' call
|
|
1154
|
-
var tmp = first_0(a).
|
|
1155
|
-
var tmp$ret$1 = first_0(b).
|
|
1153
|
+
var tmp = first_0(a).q64_1;
|
|
1154
|
+
var tmp$ret$1 = first_0(b).q64_1;
|
|
1156
1155
|
return compareValues(tmp, tmp$ret$1);
|
|
1157
1156
|
}
|
|
1158
1157
|
function CombinationsCheckerProviderImpl() {
|
|
1159
1158
|
}
|
|
1160
|
-
protoOf(CombinationsCheckerProviderImpl).
|
|
1159
|
+
protoOf(CombinationsCheckerProviderImpl).g67 = function (cards, supportedCombinations, checkFromIndex, includeCardNames, suit) {
|
|
1161
1160
|
// Inline function 'kotlin.apply' call
|
|
1162
1161
|
var this_0 = toMutableList(cards);
|
|
1163
1162
|
sortWith(this_0, CardIndexComparator_instance);
|
|
1164
1163
|
// Inline function 'kotlin.collections.filter' call
|
|
1165
1164
|
// Inline function 'kotlin.collections.filterTo' call
|
|
1166
1165
|
var destination = ArrayList_init_$Create$();
|
|
1167
|
-
var _iterator__ex2g4s = this_0.
|
|
1168
|
-
while (_iterator__ex2g4s.
|
|
1169
|
-
var element = _iterator__ex2g4s.
|
|
1170
|
-
if (element.
|
|
1171
|
-
destination.
|
|
1166
|
+
var _iterator__ex2g4s = this_0.t();
|
|
1167
|
+
while (_iterator__ex2g4s.u()) {
|
|
1168
|
+
var element = _iterator__ex2g4s.v();
|
|
1169
|
+
if (element.g65()) {
|
|
1170
|
+
destination.e1(element);
|
|
1172
1171
|
}
|
|
1173
1172
|
}
|
|
1174
1173
|
var sortedByIndexCards = toList(destination);
|
|
@@ -1177,110 +1176,110 @@
|
|
|
1177
1176
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
1178
1177
|
var combinationCards = ArrayList_init_$Create$();
|
|
1179
1178
|
var inductionVariable = 0;
|
|
1180
|
-
var last = sortedByIndexCards.
|
|
1179
|
+
var last = sortedByIndexCards.g1() - 1 | 0;
|
|
1181
1180
|
if (inductionVariable <= last)
|
|
1182
1181
|
do {
|
|
1183
1182
|
var i = inductionVariable;
|
|
1184
1183
|
inductionVariable = inductionVariable + 1 | 0;
|
|
1185
1184
|
var previousCard = lastOrNull(combinationCards);
|
|
1186
|
-
var currentCard = sortedByIndexCards.
|
|
1187
|
-
var isNextInRow = !(previousCard == null) && currentCard.
|
|
1188
|
-
var passedCardNamesCheck = includeCardNames == null || includeCardNames.
|
|
1189
|
-
var passedSuitCheck = suit == null || currentCard.
|
|
1185
|
+
var currentCard = sortedByIndexCards.h1(i);
|
|
1186
|
+
var isNextInRow = !(previousCard == null) && currentCard.q64_1 === (previousCard.q64_1 + 1 | 0) && currentCard.f65().equals(previousCard.f65());
|
|
1187
|
+
var passedCardNamesCheck = includeCardNames == null || includeCardNames.m2(currentCard.m());
|
|
1188
|
+
var passedSuitCheck = suit == null || currentCard.f65().equals(suit);
|
|
1190
1189
|
if (isNextInRow && passedSuitCheck && passedCardNamesCheck) {
|
|
1191
|
-
combinationCards.
|
|
1190
|
+
combinationCards.e1(currentCard);
|
|
1192
1191
|
} else {
|
|
1193
|
-
if (combinationCards.
|
|
1194
|
-
combinations.
|
|
1192
|
+
if (combinationCards.g1() > (checkFromIndex - 1 | 0)) {
|
|
1193
|
+
combinations.i1(this.k67(toMutableList(combinationCards), supportedCombinations));
|
|
1195
1194
|
}
|
|
1196
|
-
combinationCards.
|
|
1195
|
+
combinationCards.c3();
|
|
1197
1196
|
if (passedSuitCheck && passedCardNamesCheck) {
|
|
1198
|
-
combinationCards.
|
|
1197
|
+
combinationCards.e1(currentCard);
|
|
1199
1198
|
}
|
|
1200
1199
|
}
|
|
1201
1200
|
}
|
|
1202
1201
|
while (inductionVariable <= last);
|
|
1203
|
-
if (combinationCards.
|
|
1204
|
-
combinations.
|
|
1202
|
+
if (combinationCards.g1() > (checkFromIndex - 1 | 0)) {
|
|
1203
|
+
combinations.i1(this.k67(toMutableList(combinationCards), supportedCombinations));
|
|
1205
1204
|
}
|
|
1206
1205
|
return combinations;
|
|
1207
1206
|
};
|
|
1208
|
-
protoOf(CombinationsCheckerProviderImpl).
|
|
1207
|
+
protoOf(CombinationsCheckerProviderImpl).i67 = function (cards, cardsCount, includeCardNames) {
|
|
1209
1208
|
// Inline function 'kotlin.apply' call
|
|
1210
1209
|
var this_0 = toMutableList(cards);
|
|
1211
1210
|
sortWith(this_0, CardIndexComparator_instance);
|
|
1212
1211
|
// Inline function 'kotlin.collections.filter' call
|
|
1213
1212
|
// Inline function 'kotlin.collections.filterTo' call
|
|
1214
1213
|
var destination = ArrayList_init_$Create$();
|
|
1215
|
-
var _iterator__ex2g4s = this_0.
|
|
1216
|
-
while (_iterator__ex2g4s.
|
|
1217
|
-
var element = _iterator__ex2g4s.
|
|
1218
|
-
if (element.
|
|
1219
|
-
destination.
|
|
1214
|
+
var _iterator__ex2g4s = this_0.t();
|
|
1215
|
+
while (_iterator__ex2g4s.u()) {
|
|
1216
|
+
var element = _iterator__ex2g4s.v();
|
|
1217
|
+
if (element.g65()) {
|
|
1218
|
+
destination.e1(element);
|
|
1220
1219
|
}
|
|
1221
1220
|
}
|
|
1222
1221
|
// Inline function 'kotlin.collections.filter' call
|
|
1223
1222
|
// Inline function 'kotlin.collections.filterTo' call
|
|
1224
1223
|
var destination_0 = ArrayList_init_$Create$();
|
|
1225
|
-
var _iterator__ex2g4s_0 = destination.
|
|
1226
|
-
while (_iterator__ex2g4s_0.
|
|
1227
|
-
var element_0 = _iterator__ex2g4s_0.
|
|
1228
|
-
if (includeCardNames == null || includeCardNames.
|
|
1229
|
-
destination_0.
|
|
1224
|
+
var _iterator__ex2g4s_0 = destination.t();
|
|
1225
|
+
while (_iterator__ex2g4s_0.u()) {
|
|
1226
|
+
var element_0 = _iterator__ex2g4s_0.v();
|
|
1227
|
+
if (includeCardNames == null || includeCardNames.m2(element_0.m())) {
|
|
1228
|
+
destination_0.e1(element_0);
|
|
1230
1229
|
}
|
|
1231
1230
|
}
|
|
1232
1231
|
var sortedByNumberCards = toList(destination_0);
|
|
1233
1232
|
// Inline function 'kotlin.collections.groupBy' call
|
|
1234
1233
|
// Inline function 'kotlin.collections.groupByTo' call
|
|
1235
1234
|
var destination_1 = LinkedHashMap_init_$Create$();
|
|
1236
|
-
var _iterator__ex2g4s_1 = sortedByNumberCards.
|
|
1237
|
-
while (_iterator__ex2g4s_1.
|
|
1238
|
-
var element_1 = _iterator__ex2g4s_1.
|
|
1239
|
-
var key = element_1.
|
|
1235
|
+
var _iterator__ex2g4s_1 = sortedByNumberCards.t();
|
|
1236
|
+
while (_iterator__ex2g4s_1.u()) {
|
|
1237
|
+
var element_1 = _iterator__ex2g4s_1.v();
|
|
1238
|
+
var key = element_1.r64();
|
|
1240
1239
|
// Inline function 'kotlin.collections.getOrPut' call
|
|
1241
|
-
var value = destination_1.
|
|
1240
|
+
var value = destination_1.w2(key);
|
|
1242
1241
|
var tmp;
|
|
1243
1242
|
if (value == null) {
|
|
1244
1243
|
var answer = ArrayList_init_$Create$();
|
|
1245
|
-
destination_1.
|
|
1244
|
+
destination_1.z2(key, answer);
|
|
1246
1245
|
tmp = answer;
|
|
1247
1246
|
} else {
|
|
1248
1247
|
tmp = value;
|
|
1249
1248
|
}
|
|
1250
1249
|
var list = tmp;
|
|
1251
|
-
list.
|
|
1250
|
+
list.e1(element_1);
|
|
1252
1251
|
}
|
|
1253
1252
|
// Inline function 'kotlin.collections.filter' call
|
|
1254
1253
|
// Inline function 'kotlin.collections.filterTo' call
|
|
1255
1254
|
var destination_2 = LinkedHashMap_init_$Create$();
|
|
1256
1255
|
// Inline function 'kotlin.collections.iterator' call
|
|
1257
|
-
var _iterator__ex2g4s_2 = destination_1.
|
|
1258
|
-
while (_iterator__ex2g4s_2.
|
|
1259
|
-
var element_2 = _iterator__ex2g4s_2.
|
|
1260
|
-
if (element_2.
|
|
1261
|
-
destination_2.
|
|
1256
|
+
var _iterator__ex2g4s_2 = destination_1.m1().t();
|
|
1257
|
+
while (_iterator__ex2g4s_2.u()) {
|
|
1258
|
+
var element_2 = _iterator__ex2g4s_2.v();
|
|
1259
|
+
if (element_2.o1().g1() >= cardsCount) {
|
|
1260
|
+
destination_2.z2(element_2.n1(), element_2.o1());
|
|
1262
1261
|
}
|
|
1263
1262
|
}
|
|
1264
|
-
var combinations = destination_2.
|
|
1263
|
+
var combinations = destination_2.y2();
|
|
1265
1264
|
// Inline function 'kotlin.collections.map' call
|
|
1266
1265
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1267
1266
|
var destination_3 = ArrayList_init_$Create$_0(collectionSizeOrDefault(combinations, 10));
|
|
1268
|
-
var _iterator__ex2g4s_3 = combinations.
|
|
1269
|
-
while (_iterator__ex2g4s_3.
|
|
1270
|
-
var item = _iterator__ex2g4s_3.
|
|
1267
|
+
var _iterator__ex2g4s_3 = combinations.t();
|
|
1268
|
+
while (_iterator__ex2g4s_3.u()) {
|
|
1269
|
+
var item = _iterator__ex2g4s_3.v();
|
|
1271
1270
|
var tmp$ret$17 = sortedWith(item, CardIndexComparator_instance);
|
|
1272
|
-
destination_3.
|
|
1271
|
+
destination_3.e1(tmp$ret$17);
|
|
1273
1272
|
}
|
|
1274
1273
|
return destination_3;
|
|
1275
1274
|
};
|
|
1276
|
-
protoOf(CombinationsCheckerProviderImpl).
|
|
1275
|
+
protoOf(CombinationsCheckerProviderImpl).k67 = function (cards, supportedCombinations) {
|
|
1277
1276
|
// Inline function 'kotlin.collections.minOf' call
|
|
1278
|
-
var iterator = supportedCombinations.
|
|
1279
|
-
if (!iterator.
|
|
1277
|
+
var iterator = supportedCombinations.t();
|
|
1278
|
+
if (!iterator.u())
|
|
1280
1279
|
throw NoSuchElementException_init_$Create$_0();
|
|
1281
|
-
var minValue = iterator.
|
|
1282
|
-
while (iterator.
|
|
1283
|
-
var v = iterator.
|
|
1280
|
+
var minValue = iterator.v();
|
|
1281
|
+
while (iterator.u()) {
|
|
1282
|
+
var v = iterator.v();
|
|
1284
1283
|
if (compareTo(minValue, v) > 0) {
|
|
1285
1284
|
minValue = v;
|
|
1286
1285
|
}
|
|
@@ -1289,10 +1288,10 @@
|
|
|
1289
1288
|
var cardsToCheck = toMutableList(cards);
|
|
1290
1289
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
1291
1290
|
var combinations = ArrayList_init_$Create$();
|
|
1292
|
-
while (cardsToCheck.
|
|
1291
|
+
while (cardsToCheck.g1() >= shortestCombinationSupport) {
|
|
1293
1292
|
var combinationCards = createCombination(this, cardsToCheck, supportedCombinations);
|
|
1294
|
-
combinations.
|
|
1295
|
-
cardsToCheck.
|
|
1293
|
+
combinations.e1(toList(combinationCards));
|
|
1294
|
+
cardsToCheck.f3(combinationCards);
|
|
1296
1295
|
}
|
|
1297
1296
|
// Inline function 'kotlin.collections.sortedBy' call
|
|
1298
1297
|
// Inline function 'kotlin.comparisons.compareBy' call
|
|
@@ -1303,74 +1302,74 @@
|
|
|
1303
1302
|
function DealerReducer() {
|
|
1304
1303
|
}
|
|
1305
1304
|
function DealerReducerImpl(logger, enableLogs) {
|
|
1306
|
-
this.
|
|
1307
|
-
this.
|
|
1305
|
+
this.p67_1 = logger;
|
|
1306
|
+
this.q67_1 = enableLogs;
|
|
1308
1307
|
}
|
|
1309
|
-
protoOf(DealerReducerImpl).
|
|
1308
|
+
protoOf(DealerReducerImpl).m67 = function (cards, cardsToRemove) {
|
|
1310
1309
|
var list = cards;
|
|
1311
|
-
var _iterator__ex2g4s = cardsToRemove.
|
|
1312
|
-
while (_iterator__ex2g4s.
|
|
1313
|
-
var gameCard = _iterator__ex2g4s.
|
|
1314
|
-
list = this.
|
|
1310
|
+
var _iterator__ex2g4s = cardsToRemove.t();
|
|
1311
|
+
while (_iterator__ex2g4s.u()) {
|
|
1312
|
+
var gameCard = _iterator__ex2g4s.v();
|
|
1313
|
+
list = this.n67(list, gameCard);
|
|
1315
1314
|
}
|
|
1316
1315
|
return list;
|
|
1317
1316
|
};
|
|
1318
|
-
protoOf(DealerReducerImpl).
|
|
1317
|
+
protoOf(DealerReducerImpl).n67 = function (cards, cardToRemove) {
|
|
1319
1318
|
var tmp;
|
|
1320
|
-
if (!cardToRemove.
|
|
1321
|
-
if (this.
|
|
1322
|
-
this.
|
|
1319
|
+
if (!cardToRemove.w64() && cards.m2(cardToRemove)) {
|
|
1320
|
+
if (this.q67_1) {
|
|
1321
|
+
this.p67_1.d('Dealer', 'Card removed: ' + cardToRemove.toString() + ', size: ' + (cards.g1() - 1 | 0));
|
|
1323
1322
|
}
|
|
1324
1323
|
tmp = minus(cards, cardToRemove);
|
|
1325
1324
|
} else {
|
|
1326
|
-
if (this.
|
|
1327
|
-
this.
|
|
1325
|
+
if (this.q67_1) {
|
|
1326
|
+
this.p67_1.d('Dealer', 'Card removed as hidden: ' + cardToRemove.toString() + ', size: ' + (cards.g1() - 1 | 0));
|
|
1328
1327
|
}
|
|
1329
1328
|
// Inline function 'kotlin.collections.filterNot' call
|
|
1330
1329
|
// Inline function 'kotlin.collections.filterNotTo' call
|
|
1331
1330
|
var destination = ArrayList_init_$Create$();
|
|
1332
|
-
var _iterator__ex2g4s = cards.
|
|
1333
|
-
while (_iterator__ex2g4s.
|
|
1334
|
-
var element = _iterator__ex2g4s.
|
|
1335
|
-
if (!element.
|
|
1336
|
-
destination.
|
|
1331
|
+
var _iterator__ex2g4s = cards.t();
|
|
1332
|
+
while (_iterator__ex2g4s.u()) {
|
|
1333
|
+
var element = _iterator__ex2g4s.v();
|
|
1334
|
+
if (!element.w64()) {
|
|
1335
|
+
destination.e1(element);
|
|
1337
1336
|
}
|
|
1338
1337
|
}
|
|
1339
1338
|
var notHiddenCards = destination;
|
|
1340
1339
|
// Inline function 'kotlin.collections.filter' call
|
|
1341
1340
|
// Inline function 'kotlin.collections.filterTo' call
|
|
1342
1341
|
var destination_0 = ArrayList_init_$Create$();
|
|
1343
|
-
var _iterator__ex2g4s_0 = cards.
|
|
1344
|
-
while (_iterator__ex2g4s_0.
|
|
1345
|
-
var element_0 = _iterator__ex2g4s_0.
|
|
1346
|
-
if (element_0.
|
|
1347
|
-
destination_0.
|
|
1342
|
+
var _iterator__ex2g4s_0 = cards.t();
|
|
1343
|
+
while (_iterator__ex2g4s_0.u()) {
|
|
1344
|
+
var element_0 = _iterator__ex2g4s_0.v();
|
|
1345
|
+
if (element_0.w64()) {
|
|
1346
|
+
destination_0.e1(element_0);
|
|
1348
1347
|
}
|
|
1349
1348
|
}
|
|
1350
1349
|
var hiddenCards = destination_0;
|
|
1351
1350
|
if (hiddenCards.r()) {
|
|
1352
|
-
this.
|
|
1351
|
+
this.p67_1.w('Dealer', "Can't find card to delete for player, " + ('cards:' + toString(cards) + ', ') + ('cardToRemove: ' + cardToRemove.toString()));
|
|
1353
1352
|
}
|
|
1354
1353
|
tmp = plus(notHiddenCards, dropLast(hiddenCards, 1));
|
|
1355
1354
|
}
|
|
1356
1355
|
return tmp;
|
|
1357
1356
|
};
|
|
1358
|
-
protoOf(DealerReducerImpl).
|
|
1359
|
-
if (this.
|
|
1360
|
-
this.
|
|
1357
|
+
protoOf(DealerReducerImpl).o67 = function (cards, cardToAdd) {
|
|
1358
|
+
if (this.q67_1) {
|
|
1359
|
+
this.p67_1.d('Dealer', 'Card added: ' + cardToAdd.toString() + ', size: ' + (cards.g1() + 1 | 0));
|
|
1361
1360
|
}
|
|
1362
|
-
if (cards.
|
|
1363
|
-
this.
|
|
1361
|
+
if (cards.m2(cardToAdd)) {
|
|
1362
|
+
this.p67_1.w('Dealer', 'Card already exists for player, ' + ('cards:' + toString(cards) + ', ') + ('cardToAdd: ' + cardToAdd.toString()));
|
|
1364
1363
|
}
|
|
1365
1364
|
return plus_0(cards, cardToAdd);
|
|
1366
1365
|
};
|
|
1367
1366
|
//region block: post-declaration
|
|
1368
|
-
protoOf(CardsDealerProviderImpl).
|
|
1369
|
-
protoOf(CardsDealerProviderImpl).
|
|
1370
|
-
protoOf(FakeCardsDealerProvider).
|
|
1371
|
-
protoOf(FakeCardsDealerProvider).
|
|
1372
|
-
protoOf(CombinationsCheckerProviderImpl).
|
|
1373
|
-
protoOf(CombinationsCheckerProviderImpl).
|
|
1367
|
+
protoOf(CardsDealerProviderImpl).p65 = standardShuffledCards$default;
|
|
1368
|
+
protoOf(CardsDealerProviderImpl).r65 = realLifeShuffledCards$default;
|
|
1369
|
+
protoOf(FakeCardsDealerProvider).p65 = standardShuffledCards$default;
|
|
1370
|
+
protoOf(FakeCardsDealerProvider).r65 = realLifeShuffledCards$default;
|
|
1371
|
+
protoOf(CombinationsCheckerProviderImpl).h67 = findCardsInRowCombinations$default;
|
|
1372
|
+
protoOf(CombinationsCheckerProviderImpl).j67 = findSameCardsNumberCombinations$default;
|
|
1374
1373
|
//endregion
|
|
1375
1374
|
//region block: init
|
|
1376
1375
|
CoreConfig_instance = new CoreConfig();
|