raspberry_games_server_game_logic 1.8.362 → 1.8.363
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 +95 -95
- package/Kosi-Kaverit-kaverit.js.map +1 -1
- package/Kosi-Kodein-kodein-di.js +797 -794
- package/Kosi-Kodein-kodein-di.js.map +1 -1
- package/Kotlin-DateTime-library-kotlinx-datetime.js +2092 -2031
- package/Kotlin-DateTime-library-kotlinx-datetime.js.map +1 -1
- package/Logic_Debertz-core.js +2052 -2095
- package/Logic_Debertz-core.js.map +1 -1
- package/Logic_Debertz-engine.js +18105 -18376
- package/Logic_Debertz-engine.js.map +1 -1
- package/Logic_Debertz-game_server.js +1812 -1868
- package/Logic_Debertz-game_server.js.map +1 -1
- package/error-library-error.js +7 -7
- package/kotlin-kotlin-stdlib.js +5697 -5646
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kotlinx-atomicfu.js +83 -79
- package/kotlinx-atomicfu.js.map +1 -1
- package/kotlinx-coroutines-core.js +3341 -3350
- package/kotlinx-coroutines-core.js.map +1 -1
- package/kotlinx-io-kotlinx-io-core.js +431 -415
- package/kotlinx-io-kotlinx-io-core.js.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-core.js +2654 -2650
- package/kotlinx-serialization-kotlinx-serialization-core.js.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-json.js +1803 -1791
- package/kotlinx-serialization-kotlinx-serialization-json.js.map +1 -1
- package/ktor-ktor-client-content-negotiation.js +262 -269
- package/ktor-ktor-client-content-negotiation.js.map +1 -1
- package/ktor-ktor-client-core.js +2653 -2729
- package/ktor-ktor-client-core.js.map +1 -1
- package/ktor-ktor-client-logging.js +581 -606
- package/ktor-ktor-client-logging.js.map +1 -1
- package/ktor-ktor-events.js +13 -13
- package/ktor-ktor-http.js +903 -899
- package/ktor-ktor-http.js.map +1 -1
- package/ktor-ktor-io.js +1985 -1976
- package/ktor-ktor-io.js.map +1 -1
- package/ktor-ktor-serialization-kotlinx-json.js +9 -9
- package/ktor-ktor-serialization-kotlinx.js +300 -316
- package/ktor-ktor-serialization-kotlinx.js.map +1 -1
- package/ktor-ktor-serialization.js +133 -141
- package/ktor-ktor-serialization.js.map +1 -1
- package/ktor-ktor-utils.js +846 -856
- package/ktor-ktor-utils.js.map +1 -1
- package/ktor-ktor-websockets.js +61 -61
- package/ktor-ktor-websockets.js.map +1 -1
- package/package.json +1 -1
- package/random-library-crypto-rand.js +16 -16
- 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 +372 -375
- package/raspberry-cardgame-lib-core.js.map +1 -1
- package/raspberry-cardgame-lib-logger.js +119 -119
- package/raspberry-cardgame-lib-logger.js.map +1 -1
- package/raspberry-cardgame-lib-random.js +1167 -1194
- package/raspberry-cardgame-lib-random.js.map +1 -1
- package/uuid.js +39 -39
- package/uuid.js.map +1 -1
|
@@ -19,68 +19,68 @@
|
|
|
19
19
|
'use strict';
|
|
20
20
|
//region block: imports
|
|
21
21
|
var imul = Math.imul;
|
|
22
|
-
var protoOf = kotlin_kotlin.$_$.
|
|
23
|
-
var initMetadataForObject = kotlin_kotlin.$_$.
|
|
24
|
-
var defineProp = kotlin_kotlin.$_$.
|
|
25
|
-
var
|
|
26
|
-
var
|
|
27
|
-
var
|
|
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.$_$.
|
|
22
|
+
var protoOf = kotlin_kotlin.$_$.hd;
|
|
23
|
+
var initMetadataForObject = kotlin_kotlin.$_$.mc;
|
|
24
|
+
var defineProp = kotlin_kotlin.$_$.zb;
|
|
25
|
+
var VOID = kotlin_kotlin.$_$.b;
|
|
26
|
+
var THROW_CCE = kotlin_kotlin.$_$.kh;
|
|
27
|
+
var Comparator = kotlin_kotlin.$_$.xg;
|
|
28
|
+
var take = kotlin_kotlin.$_$.f9;
|
|
29
|
+
var toList = kotlin_kotlin.$_$.j9;
|
|
30
|
+
var Unit_instance = kotlin_kotlin.$_$.f5;
|
|
31
|
+
var takeLast = kotlin_kotlin.$_$.e9;
|
|
32
|
+
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.h;
|
|
33
|
+
var noWhenBranchMatchedException = kotlin_kotlin.$_$.ii;
|
|
34
|
+
var initMetadataForCompanion = kotlin_kotlin.$_$.ic;
|
|
35
|
+
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.p1;
|
|
36
|
+
var Enum = kotlin_kotlin.$_$.ah;
|
|
37
|
+
var initMetadataForClass = kotlin_kotlin.$_$.hc;
|
|
38
38
|
var createSimpleEnumSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.h2;
|
|
39
|
-
var enumEntries = kotlin_kotlin.$_$.
|
|
40
|
-
var LazyThreadSafetyMode_PUBLICATION_getInstance = kotlin_kotlin.$_$.
|
|
41
|
-
var lazy = kotlin_kotlin.$_$.
|
|
39
|
+
var enumEntries = kotlin_kotlin.$_$.pa;
|
|
40
|
+
var LazyThreadSafetyMode_PUBLICATION_getInstance = kotlin_kotlin.$_$.e;
|
|
41
|
+
var lazy = kotlin_kotlin.$_$.gi;
|
|
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.$_$.kc;
|
|
44
|
+
var collectionSizeOrDefault = kotlin_kotlin.$_$.i6;
|
|
45
|
+
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.g;
|
|
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.$_$.na;
|
|
48
|
+
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.y9;
|
|
49
|
+
var initMetadataForCoroutine = kotlin_kotlin.$_$.jc;
|
|
50
|
+
var Result = kotlin_kotlin.$_$.ih;
|
|
51
|
+
var Result__exceptionOrNull_impl_p6xea9 = kotlin_kotlin.$_$.u2;
|
|
52
|
+
var throwOnFailure = kotlin_kotlin.$_$.mi;
|
|
53
|
+
var _Result___get_value__impl__bjfvqg = kotlin_kotlin.$_$.x2;
|
|
54
|
+
var _Result___get_isSuccess__impl__sndoy8 = kotlin_kotlin.$_$.w2;
|
|
55
|
+
var addAll = kotlin_kotlin.$_$.w5;
|
|
56
|
+
var until = kotlin_kotlin.$_$.yd;
|
|
57
|
+
var count = kotlin_kotlin.$_$.z6;
|
|
58
|
+
var Collection = kotlin_kotlin.$_$.h5;
|
|
59
|
+
var isInterface = kotlin_kotlin.$_$.vc;
|
|
60
|
+
var toMutableList = kotlin_kotlin.$_$.n9;
|
|
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.$_$.g8;
|
|
64
|
+
var first = kotlin_kotlin.$_$.l7;
|
|
65
|
+
var sorted = kotlin_kotlin.$_$.c9;
|
|
66
|
+
var asReversed = kotlin_kotlin.$_$.a6;
|
|
67
|
+
var NoSuchElementException_init_$Create$ = kotlin_kotlin.$_$.w1;
|
|
68
|
+
var equals = kotlin_kotlin.$_$.ac;
|
|
69
|
+
var FunctionAdapter = kotlin_kotlin.$_$.nb;
|
|
70
|
+
var hashCode = kotlin_kotlin.$_$.gc;
|
|
71
|
+
var first_0 = kotlin_kotlin.$_$.k7;
|
|
72
|
+
var compareValues = kotlin_kotlin.$_$.w9;
|
|
73
|
+
var sortWith = kotlin_kotlin.$_$.a9;
|
|
74
|
+
var lastOrNull = kotlin_kotlin.$_$.a8;
|
|
75
|
+
var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.q;
|
|
76
|
+
var sortedWith = kotlin_kotlin.$_$.b9;
|
|
77
|
+
var NoSuchElementException_init_$Create$_0 = kotlin_kotlin.$_$.u1;
|
|
78
|
+
var compareTo = kotlin_kotlin.$_$.yb;
|
|
79
|
+
var toString = kotlin_kotlin.$_$.kd;
|
|
80
|
+
var dropLast = kotlin_kotlin.$_$.b7;
|
|
81
|
+
var plus = kotlin_kotlin.$_$.p8;
|
|
82
|
+
var minus = kotlin_kotlin.$_$.k8;
|
|
83
|
+
var plus_0 = kotlin_kotlin.$_$.q8;
|
|
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.l5e(cards, times) : $super.l5e.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.n5e(cards, times) : $super.n5e.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.d5g(cards, supportedCombinations, checkFromIndex, includeCardNames, suit) : $super.d5g.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.f5g(cards, cardsCount, includeCardNames) : $super.f5g.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]);
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
function CoreConfig() {
|
|
129
129
|
this.version = '0.0.53';
|
|
130
130
|
}
|
|
131
|
-
protoOf(CoreConfig).
|
|
131
|
+
protoOf(CoreConfig).y3v = 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).q5d = function (a, b) {
|
|
141
|
+
return a.r5d_1 - b.r5d_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.q5d(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).q5d = function (a, b) {
|
|
154
|
+
return b.s5d() - a.s5d() | 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.q5d(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.k2(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.k2(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.l();
|
|
180
|
+
while (_iterator__ex2g4s.m()) {
|
|
181
|
+
var element = _iterator__ex2g4s.n();
|
|
182
182
|
if (predicate(element)) {
|
|
183
|
-
destination.
|
|
183
|
+
destination.j(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.q2().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.p2_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).t5d = 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).u5d = function (suit, cardNumber) {
|
|
303
303
|
return new GameCard(getNumber(Companion_instance_0, cardNumber, suit));
|
|
304
304
|
};
|
|
305
|
-
protoOf(Companion).
|
|
305
|
+
protoOf(Companion).v5d = function (index) {
|
|
306
306
|
return new GameCard(index);
|
|
307
307
|
};
|
|
308
|
-
protoOf(Companion).
|
|
308
|
+
protoOf(Companion).w5d = 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.x5d()) {
|
|
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.r5d_1;
|
|
324
|
+
var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : Companion_instance_0.d5e(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).e5e = 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.w5d(position, playerIndex, previousHiddenCardWithMaxIndex, reverse) : $super.w5d.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.p2_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.r5d_1 >= 150 && $this.r5d_1 <= 202;
|
|
451
451
|
}
|
|
452
452
|
function CardName(name, ordinal) {
|
|
453
453
|
Enum.call(this, name, ordinal);
|
|
@@ -456,13 +456,13 @@
|
|
|
456
456
|
return getShortName(this);
|
|
457
457
|
};
|
|
458
458
|
function Companion_0() {
|
|
459
|
-
this.
|
|
460
|
-
this.
|
|
461
|
-
this.
|
|
462
|
-
this.
|
|
463
|
-
this.
|
|
459
|
+
this.y5d_1 = -1;
|
|
460
|
+
this.z5d_1 = 13;
|
|
461
|
+
this.a5e_1 = 52;
|
|
462
|
+
this.b5e_1 = 150;
|
|
463
|
+
this.c5e_1 = 53;
|
|
464
464
|
}
|
|
465
|
-
protoOf(Companion_0).
|
|
465
|
+
protoOf(Companion_0).d5e = function (_this__u8e3s4, playerIndex, reverse) {
|
|
466
466
|
var tmp;
|
|
467
467
|
if (reverse) {
|
|
468
468
|
tmp = _this__u8e3s4 + (53 + imul(playerIndex, 14) | 0) | 0;
|
|
@@ -532,59 +532,59 @@
|
|
|
532
532
|
return CardName_HIDDEN_instance;
|
|
533
533
|
}
|
|
534
534
|
function GameCard(index) {
|
|
535
|
-
this.
|
|
535
|
+
this.r5d_1 = index;
|
|
536
536
|
}
|
|
537
|
-
protoOf(GameCard).
|
|
537
|
+
protoOf(GameCard).f5e = function () {
|
|
538
538
|
var tmp;
|
|
539
|
-
var containsArg = this.
|
|
539
|
+
var containsArg = this.r5d_1;
|
|
540
540
|
if (0 <= containsArg ? containsArg <= 13 : false) {
|
|
541
541
|
tmp = Suit_DIAMOND_getInstance();
|
|
542
542
|
} else {
|
|
543
|
-
if (this.
|
|
543
|
+
if (this.r5d_1 <= 26) {
|
|
544
544
|
tmp = Suit_SPADE_getInstance();
|
|
545
545
|
} else {
|
|
546
|
-
if (this.
|
|
546
|
+
if (this.r5d_1 <= 39) {
|
|
547
547
|
tmp = Suit_HEART_getInstance();
|
|
548
548
|
} else {
|
|
549
|
-
if (this.
|
|
549
|
+
if (this.r5d_1 <= 52) {
|
|
550
550
|
tmp = Suit_CLUB_getInstance();
|
|
551
551
|
} else {
|
|
552
|
-
throw IllegalStateException_init_$Create$('Invalid suitCard in Card.getValue() ' + this.
|
|
552
|
+
throw IllegalStateException_init_$Create$('Invalid suitCard in Card.getValue() ' + this.r5d_1);
|
|
553
553
|
}
|
|
554
554
|
}
|
|
555
555
|
}
|
|
556
556
|
}
|
|
557
557
|
return tmp;
|
|
558
558
|
};
|
|
559
|
-
protoOf(GameCard).
|
|
559
|
+
protoOf(GameCard).s5d = function () {
|
|
560
560
|
var tmp;
|
|
561
|
-
if (this.
|
|
561
|
+
if (this.x5d()) {
|
|
562
562
|
tmp = -1;
|
|
563
563
|
} else {
|
|
564
|
-
tmp = this.
|
|
564
|
+
tmp = this.r5d_1 - imul(13, getIndex(this.f5e())) | 0;
|
|
565
565
|
}
|
|
566
566
|
return tmp;
|
|
567
567
|
};
|
|
568
|
-
protoOf(GameCard).
|
|
569
|
-
return this.
|
|
568
|
+
protoOf(GameCard).q2 = function () {
|
|
569
|
+
return this.x5d() ? CardName_HIDDEN_getInstance() : getName(Companion_instance_0, this.s5d());
|
|
570
570
|
};
|
|
571
|
-
protoOf(GameCard).
|
|
572
|
-
return !_get_isShirt__vd98rp(this) && !this.
|
|
571
|
+
protoOf(GameCard).g5e = function () {
|
|
572
|
+
return !_get_isShirt__vd98rp(this) && !this.x5d();
|
|
573
573
|
};
|
|
574
|
-
protoOf(GameCard).
|
|
575
|
-
return this.
|
|
574
|
+
protoOf(GameCard).x5d = function () {
|
|
575
|
+
return this.r5d_1 >= 53 && this.r5d_1 <= 105;
|
|
576
576
|
};
|
|
577
577
|
protoOf(GameCard).toString = function () {
|
|
578
578
|
if (_get_isShirt__vd98rp(this)) {
|
|
579
|
-
return 'GameCard(SHIRT, ' + this.
|
|
579
|
+
return 'GameCard(SHIRT, ' + this.r5d_1 + ')';
|
|
580
580
|
}
|
|
581
|
-
if (this.
|
|
582
|
-
return 'GameCard(HIDDEN, ' + this.
|
|
581
|
+
if (this.x5d()) {
|
|
582
|
+
return 'GameCard(HIDDEN, ' + this.r5d_1 + ')';
|
|
583
583
|
}
|
|
584
|
-
return 'GameCard(' + this.
|
|
584
|
+
return 'GameCard(' + this.f5e().toString() + this.q2().toString() + ', ' + this.r5d_1 + ')';
|
|
585
585
|
};
|
|
586
586
|
protoOf(GameCard).hashCode = function () {
|
|
587
|
-
return this.
|
|
587
|
+
return this.r5d_1;
|
|
588
588
|
};
|
|
589
589
|
protoOf(GameCard).equals = function (other) {
|
|
590
590
|
if (this === other)
|
|
@@ -592,12 +592,12 @@
|
|
|
592
592
|
if (!(other instanceof GameCard))
|
|
593
593
|
return false;
|
|
594
594
|
var tmp0_other_with_cast = other instanceof GameCard ? other : THROW_CCE();
|
|
595
|
-
if (!(this.
|
|
595
|
+
if (!(this.r5d_1 === tmp0_other_with_cast.r5d_1))
|
|
596
596
|
return false;
|
|
597
597
|
return true;
|
|
598
598
|
};
|
|
599
599
|
function _get_$cachedSerializer__te6jhj($this) {
|
|
600
|
-
return $this.
|
|
600
|
+
return $this.h5e_1.w();
|
|
601
601
|
}
|
|
602
602
|
function Suit$Companion$_anonymous__cbm2iq() {
|
|
603
603
|
return createSimpleEnumSerializer('io.raspberryapps.card_game.core.data.models.cards.Suit', values());
|
|
@@ -608,7 +608,7 @@
|
|
|
608
608
|
var Suit_CLUB_instance;
|
|
609
609
|
function getSuitEmoji($this) {
|
|
610
610
|
var tmp;
|
|
611
|
-
switch ($this.
|
|
611
|
+
switch ($this.p2_1) {
|
|
612
612
|
case 0:
|
|
613
613
|
tmp = '\u2666\uFE0F';
|
|
614
614
|
break;
|
|
@@ -639,13 +639,13 @@
|
|
|
639
639
|
Companion_instance_1 = this;
|
|
640
640
|
var tmp = this;
|
|
641
641
|
var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
642
|
-
tmp.
|
|
642
|
+
tmp.h5e_1 = lazy(tmp_0, Suit$Companion$_anonymous__cbm2iq);
|
|
643
643
|
}
|
|
644
|
-
protoOf(Companion_1).
|
|
644
|
+
protoOf(Companion_1).a1c = function () {
|
|
645
645
|
return _get_$cachedSerializer__te6jhj(this);
|
|
646
646
|
};
|
|
647
|
-
protoOf(Companion_1).
|
|
648
|
-
return this.
|
|
647
|
+
protoOf(Companion_1).g10 = function (typeParamsSerializers) {
|
|
648
|
+
return this.a1c();
|
|
649
649
|
};
|
|
650
650
|
var Companion_instance_1;
|
|
651
651
|
function Companion_getInstance_1() {
|
|
@@ -690,7 +690,7 @@
|
|
|
690
690
|
}
|
|
691
691
|
function getIndex(_this__u8e3s4) {
|
|
692
692
|
var tmp;
|
|
693
|
-
switch (_this__u8e3s4.
|
|
693
|
+
switch (_this__u8e3s4.p2_1) {
|
|
694
694
|
case 0:
|
|
695
695
|
tmp = 0;
|
|
696
696
|
break;
|
|
@@ -740,29 +740,29 @@
|
|
|
740
740
|
}
|
|
741
741
|
function getRandomOrgCards($this, leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundsCount, userData, signed, $completion) {
|
|
742
742
|
var tmp = new $getRandomOrgCardsCOROUTINE$($this, leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundsCount, userData, signed, $completion);
|
|
743
|
-
tmp.
|
|
744
|
-
tmp.
|
|
745
|
-
return tmp.
|
|
743
|
+
tmp.t8_1 = Unit_instance;
|
|
744
|
+
tmp.u8_1 = null;
|
|
745
|
+
return tmp.z8();
|
|
746
746
|
}
|
|
747
747
|
function normalizeCards($this, cards, leftCardIndexForEachSuit) {
|
|
748
|
-
var oneSuitCount = cards.
|
|
748
|
+
var oneSuitCount = cards.o() / get_entries().o() | 0;
|
|
749
749
|
// Inline function 'kotlin.collections.map' call
|
|
750
750
|
// Inline function 'kotlin.collections.mapTo' call
|
|
751
751
|
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(cards, 10));
|
|
752
|
-
var _iterator__ex2g4s = cards.
|
|
753
|
-
while (_iterator__ex2g4s.
|
|
754
|
-
var item = _iterator__ex2g4s.
|
|
752
|
+
var _iterator__ex2g4s = cards.l();
|
|
753
|
+
while (_iterator__ex2g4s.m()) {
|
|
754
|
+
var item = _iterator__ex2g4s.n();
|
|
755
755
|
var previousSuitNumber = item / oneSuitCount | 0;
|
|
756
756
|
var cardIndexShift = imul(leftCardIndexForEachSuit, previousSuitNumber + 1 | 0);
|
|
757
757
|
var newIndex = item + cardIndexShift | 0;
|
|
758
|
-
destination.
|
|
758
|
+
destination.j(newIndex);
|
|
759
759
|
}
|
|
760
760
|
var newIndexes = destination;
|
|
761
761
|
return newIndexes;
|
|
762
762
|
}
|
|
763
763
|
function Companion_2() {
|
|
764
764
|
}
|
|
765
|
-
protoOf(Companion_2).
|
|
765
|
+
protoOf(Companion_2).f5f = function (randomPoolProvider, logger) {
|
|
766
766
|
var tmp0_random = new SecureRandom(logger);
|
|
767
767
|
return new CardsDealerProviderImpl(tmp0_random, randomPoolProvider, logger);
|
|
768
768
|
};
|
|
@@ -772,41 +772,40 @@
|
|
|
772
772
|
}
|
|
773
773
|
function $createNewShuffledCardDeckCOROUTINE$(_this__u8e3s4, leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundCountForGame, userData, provider, resultContinuation) {
|
|
774
774
|
CoroutineImpl.call(this, resultContinuation);
|
|
775
|
-
this.
|
|
776
|
-
this.
|
|
777
|
-
this.
|
|
778
|
-
this.
|
|
779
|
-
this.
|
|
780
|
-
this.
|
|
781
|
-
}
|
|
782
|
-
protoOf($createNewShuffledCardDeckCOROUTINE$).
|
|
783
|
-
var suspendResult = this.
|
|
775
|
+
this.o5f_1 = _this__u8e3s4;
|
|
776
|
+
this.p5f_1 = leftCardIndexForEachSuit;
|
|
777
|
+
this.q5f_1 = rightCardIndexForEachSuit;
|
|
778
|
+
this.r5f_1 = approximateRoundCountForGame;
|
|
779
|
+
this.s5f_1 = userData;
|
|
780
|
+
this.t5f_1 = provider;
|
|
781
|
+
}
|
|
782
|
+
protoOf($createNewShuffledCardDeckCOROUTINE$).z8 = function () {
|
|
783
|
+
var suspendResult = this.t8_1;
|
|
784
784
|
$sm: do
|
|
785
785
|
try {
|
|
786
|
-
var tmp = this.
|
|
786
|
+
var tmp = this.r8_1;
|
|
787
787
|
switch (tmp) {
|
|
788
788
|
case 0:
|
|
789
|
-
this.
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
if (this.o6e_1 === 0) {
|
|
789
|
+
this.s8_1 = 4;
|
|
790
|
+
var tmp0 = this.t5f_1.p2_1;
|
|
791
|
+
if (tmp0 === 0) {
|
|
793
792
|
var tmp_0 = this;
|
|
794
|
-
var it = this.
|
|
795
|
-
tmp_0.
|
|
796
|
-
this.
|
|
793
|
+
var it = this.o5f_1.i5e(this.p5f_1, this.q5f_1);
|
|
794
|
+
tmp_0.u5f_1 = this.o5f_1.m5e(it);
|
|
795
|
+
this.r8_1 = 3;
|
|
797
796
|
continue $sm;
|
|
798
797
|
} else {
|
|
799
|
-
if (
|
|
800
|
-
this.
|
|
801
|
-
suspendResult = getRandomOrgCards(this.
|
|
798
|
+
if (tmp0 === 1) {
|
|
799
|
+
this.r8_1 = 2;
|
|
800
|
+
suspendResult = getRandomOrgCards(this.o5f_1, this.p5f_1, this.q5f_1, this.r5f_1, this.s5f_1, false, this);
|
|
802
801
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
803
802
|
return suspendResult;
|
|
804
803
|
}
|
|
805
804
|
continue $sm;
|
|
806
805
|
} else {
|
|
807
|
-
if (
|
|
808
|
-
this.
|
|
809
|
-
suspendResult = getRandomOrgCards(this.
|
|
806
|
+
if (tmp0 === 2) {
|
|
807
|
+
this.r8_1 = 1;
|
|
808
|
+
suspendResult = getRandomOrgCards(this.o5f_1, this.p5f_1, this.q5f_1, this.r5f_1, this.s5f_1, true, this);
|
|
810
809
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
811
810
|
return suspendResult;
|
|
812
811
|
}
|
|
@@ -820,86 +819,84 @@
|
|
|
820
819
|
|
|
821
820
|
break;
|
|
822
821
|
case 1:
|
|
823
|
-
this.
|
|
824
|
-
this.
|
|
822
|
+
this.u5f_1 = suspendResult;
|
|
823
|
+
this.r8_1 = 3;
|
|
825
824
|
continue $sm;
|
|
826
825
|
case 2:
|
|
827
|
-
this.
|
|
828
|
-
this.
|
|
826
|
+
this.u5f_1 = suspendResult;
|
|
827
|
+
this.r8_1 = 3;
|
|
829
828
|
continue $sm;
|
|
830
829
|
case 3:
|
|
831
|
-
return this.
|
|
830
|
+
return this.u5f_1;
|
|
832
831
|
case 4:
|
|
833
|
-
throw this.
|
|
832
|
+
throw this.u8_1;
|
|
834
833
|
}
|
|
835
834
|
} catch ($p) {
|
|
836
835
|
var e = $p;
|
|
837
|
-
if (this.
|
|
836
|
+
if (this.s8_1 === 4) {
|
|
838
837
|
throw e;
|
|
839
838
|
} else {
|
|
840
|
-
this.
|
|
841
|
-
this.
|
|
839
|
+
this.r8_1 = this.s8_1;
|
|
840
|
+
this.u8_1 = e;
|
|
842
841
|
}
|
|
843
842
|
}
|
|
844
843
|
while (true);
|
|
845
844
|
};
|
|
846
845
|
function $getRandomOrgCardsCOROUTINE$(_this__u8e3s4, leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundsCount, userData, signed, resultContinuation) {
|
|
847
846
|
CoroutineImpl.call(this, resultContinuation);
|
|
848
|
-
this.
|
|
849
|
-
this.
|
|
850
|
-
this.
|
|
851
|
-
this.
|
|
852
|
-
this.
|
|
853
|
-
this.
|
|
854
|
-
}
|
|
855
|
-
protoOf($getRandomOrgCardsCOROUTINE$).
|
|
856
|
-
var suspendResult = this.
|
|
847
|
+
this.y5e_1 = _this__u8e3s4;
|
|
848
|
+
this.z5e_1 = leftCardIndexForEachSuit;
|
|
849
|
+
this.a5f_1 = rightCardIndexForEachSuit;
|
|
850
|
+
this.b5f_1 = approximateRoundsCount;
|
|
851
|
+
this.c5f_1 = userData;
|
|
852
|
+
this.d5f_1 = signed;
|
|
853
|
+
}
|
|
854
|
+
protoOf($getRandomOrgCardsCOROUTINE$).z8 = function () {
|
|
855
|
+
var suspendResult = this.t8_1;
|
|
857
856
|
$sm: do
|
|
858
857
|
try {
|
|
859
|
-
var tmp = this.
|
|
858
|
+
var tmp = this.r8_1;
|
|
860
859
|
switch (tmp) {
|
|
861
860
|
case 0:
|
|
862
|
-
this.
|
|
863
|
-
|
|
864
|
-
this
|
|
865
|
-
|
|
866
|
-
this.
|
|
867
|
-
suspendResult = this.
|
|
861
|
+
this.s8_1 = 5;
|
|
862
|
+
var cardsCount = this.y5e_1.p5e(this.z5e_1, this.a5f_1);
|
|
863
|
+
var tmp0_$this = this.y5e_1.w5f_1;
|
|
864
|
+
var tmp1_max = cardsCount - 1 | 0;
|
|
865
|
+
this.r8_1 = 1;
|
|
866
|
+
suspendResult = tmp0_$this.j58(this.b5f_1, this.c5f_1, 0, tmp1_max, cardsCount, this.d5f_1, VOID, this);
|
|
868
867
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
869
868
|
return suspendResult;
|
|
870
869
|
}
|
|
871
870
|
|
|
872
|
-
this.
|
|
871
|
+
this.r8_1 = 2;
|
|
873
872
|
continue $sm;
|
|
874
873
|
case 1:
|
|
875
|
-
|
|
876
|
-
suspendResult = new Result(
|
|
877
|
-
this.
|
|
874
|
+
var unboxed = suspendResult.tl_1;
|
|
875
|
+
suspendResult = new Result(unboxed);
|
|
876
|
+
this.r8_1 = 2;
|
|
878
877
|
continue $sm;
|
|
879
878
|
case 2:
|
|
880
|
-
|
|
881
|
-
if (_Result___get_isSuccess__impl__sndoy8(
|
|
879
|
+
var result = suspendResult.tl_1;
|
|
880
|
+
if (_Result___get_isSuccess__impl__sndoy8(result)) {
|
|
882
881
|
var tmp_0 = this;
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
var tmp_1 = _Result___get_value__impl__bjfvqg(this_0);
|
|
882
|
+
throwOnFailure(result);
|
|
883
|
+
var tmp_1 = _Result___get_value__impl__bjfvqg(result);
|
|
886
884
|
var tmp2_cards = ((tmp_1 == null ? true : !(tmp_1 == null)) ? tmp_1 : THROW_CCE()).cards;
|
|
887
|
-
var
|
|
888
|
-
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(
|
|
889
|
-
var _iterator__ex2g4s =
|
|
890
|
-
while (_iterator__ex2g4s.
|
|
891
|
-
var item = _iterator__ex2g4s.
|
|
892
|
-
destination.
|
|
885
|
+
var this_0 = normalizeCards(this.y5e_1, tmp2_cards, this.z5e_1);
|
|
886
|
+
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
887
|
+
var _iterator__ex2g4s = this_0.l();
|
|
888
|
+
while (_iterator__ex2g4s.m()) {
|
|
889
|
+
var item = _iterator__ex2g4s.n();
|
|
890
|
+
destination.j(Companion_instance.v5d(item));
|
|
893
891
|
}
|
|
894
|
-
tmp_0.
|
|
895
|
-
this.
|
|
892
|
+
tmp_0.e5f_1 = destination;
|
|
893
|
+
this.r8_1 = 4;
|
|
896
894
|
continue $sm;
|
|
897
895
|
} else {
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
this.
|
|
901
|
-
this.
|
|
902
|
-
suspendResult = this.l6d_1.w6c(this.m6d_1, this.n6d_1, this.o6d_1, this.p6d_1, CardsRandomProvider_CUSTOM_getInstance(), this);
|
|
896
|
+
var exception = Result__exceptionOrNull_impl_p6xea9(result);
|
|
897
|
+
this.y5e_1.x5f_1.v('CardsDealerProvider', 'getRandomOrgCards: ' + (exception == null ? null : exception.message), exception);
|
|
898
|
+
this.r8_1 = 3;
|
|
899
|
+
suspendResult = this.y5e_1.j5e(this.z5e_1, this.a5f_1, this.b5f_1, this.c5f_1, CardsRandomProvider_CUSTOM_getInstance(), this);
|
|
903
900
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
904
901
|
return suspendResult;
|
|
905
902
|
}
|
|
@@ -907,51 +904,51 @@
|
|
|
907
904
|
}
|
|
908
905
|
|
|
909
906
|
case 3:
|
|
910
|
-
this.
|
|
911
|
-
this.
|
|
907
|
+
this.e5f_1 = suspendResult;
|
|
908
|
+
this.r8_1 = 4;
|
|
912
909
|
continue $sm;
|
|
913
910
|
case 4:
|
|
914
|
-
return this.
|
|
911
|
+
return this.e5f_1;
|
|
915
912
|
case 5:
|
|
916
|
-
throw this.
|
|
913
|
+
throw this.u8_1;
|
|
917
914
|
}
|
|
918
915
|
} catch ($p) {
|
|
919
916
|
var e = $p;
|
|
920
|
-
if (this.
|
|
917
|
+
if (this.s8_1 === 5) {
|
|
921
918
|
throw e;
|
|
922
919
|
} else {
|
|
923
|
-
this.
|
|
924
|
-
this.
|
|
920
|
+
this.r8_1 = this.s8_1;
|
|
921
|
+
this.u8_1 = e;
|
|
925
922
|
}
|
|
926
923
|
}
|
|
927
924
|
while (true);
|
|
928
925
|
};
|
|
929
926
|
function CardsDealerProviderImpl(random, randomPoolProvider, logger) {
|
|
930
|
-
this.
|
|
931
|
-
this.
|
|
932
|
-
this.
|
|
927
|
+
this.v5f_1 = random;
|
|
928
|
+
this.w5f_1 = randomPoolProvider;
|
|
929
|
+
this.x5f_1 = logger;
|
|
933
930
|
}
|
|
934
|
-
protoOf(CardsDealerProviderImpl).
|
|
931
|
+
protoOf(CardsDealerProviderImpl).i5e = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit) {
|
|
935
932
|
// Inline function 'kotlin.collections.flatMap' call
|
|
936
933
|
var tmp0 = get_entries();
|
|
937
934
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
938
935
|
var destination = ArrayList_init_$Create$();
|
|
939
|
-
var _iterator__ex2g4s = tmp0.
|
|
940
|
-
while (_iterator__ex2g4s.
|
|
941
|
-
var element = _iterator__ex2g4s.
|
|
936
|
+
var _iterator__ex2g4s = tmp0.l();
|
|
937
|
+
while (_iterator__ex2g4s.m()) {
|
|
938
|
+
var element = _iterator__ex2g4s.n();
|
|
942
939
|
// Inline function 'kotlin.collections.map' call
|
|
943
|
-
var this_0 = this.
|
|
940
|
+
var this_0 = this.y5f(leftCardIndexForEachSuit, rightCardIndexForEachSuit);
|
|
944
941
|
// Inline function 'kotlin.collections.mapTo' call
|
|
945
942
|
var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
946
|
-
var inductionVariable = this_0.
|
|
947
|
-
var last = this_0.
|
|
943
|
+
var inductionVariable = this_0.z_1;
|
|
944
|
+
var last = this_0.a1_1;
|
|
948
945
|
if (inductionVariable <= last)
|
|
949
946
|
do {
|
|
950
947
|
var item = inductionVariable;
|
|
951
948
|
inductionVariable = inductionVariable + 1 | 0;
|
|
952
949
|
var it = item;
|
|
953
|
-
var tmp$ret$0 = Companion_instance.
|
|
954
|
-
destination_0.
|
|
950
|
+
var tmp$ret$0 = Companion_instance.t5d(element, it);
|
|
951
|
+
destination_0.j(tmp$ret$0);
|
|
955
952
|
}
|
|
956
953
|
while (!(item === last));
|
|
957
954
|
var list = destination_0;
|
|
@@ -959,38 +956,38 @@
|
|
|
959
956
|
}
|
|
960
957
|
return destination;
|
|
961
958
|
};
|
|
962
|
-
protoOf(CardsDealerProviderImpl).
|
|
959
|
+
protoOf(CardsDealerProviderImpl).y5f = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit) {
|
|
963
960
|
return until(leftCardIndexForEachSuit, 13 - rightCardIndexForEachSuit | 0);
|
|
964
961
|
};
|
|
965
|
-
protoOf(CardsDealerProviderImpl).
|
|
962
|
+
protoOf(CardsDealerProviderImpl).p5e = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit) {
|
|
966
963
|
// Inline function 'kotlin.collections.sumOf' call
|
|
967
964
|
var sum = 0;
|
|
968
|
-
var _iterator__ex2g4s = get_entries().
|
|
969
|
-
while (_iterator__ex2g4s.
|
|
970
|
-
var element = _iterator__ex2g4s.
|
|
965
|
+
var _iterator__ex2g4s = get_entries().l();
|
|
966
|
+
while (_iterator__ex2g4s.m()) {
|
|
967
|
+
var element = _iterator__ex2g4s.n();
|
|
971
968
|
var tmp = sum;
|
|
972
|
-
sum = tmp + count(this.
|
|
969
|
+
sum = tmp + count(this.y5f(leftCardIndexForEachSuit, rightCardIndexForEachSuit)) | 0;
|
|
973
970
|
}
|
|
974
971
|
return sum;
|
|
975
972
|
};
|
|
976
|
-
protoOf(CardsDealerProviderImpl).
|
|
973
|
+
protoOf(CardsDealerProviderImpl).j5e = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundCountForGame, userData, provider, $completion) {
|
|
977
974
|
var tmp = new $createNewShuffledCardDeckCOROUTINE$(this, leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundCountForGame, userData, provider, $completion);
|
|
978
|
-
tmp.
|
|
979
|
-
tmp.
|
|
980
|
-
return tmp.
|
|
975
|
+
tmp.t8_1 = Unit_instance;
|
|
976
|
+
tmp.u8_1 = null;
|
|
977
|
+
return tmp.z8();
|
|
981
978
|
};
|
|
982
|
-
protoOf(CardsDealerProviderImpl).
|
|
979
|
+
protoOf(CardsDealerProviderImpl).k5e = function (count, cards) {
|
|
983
980
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
984
981
|
// Inline function 'kotlin.apply' call
|
|
985
982
|
var this_0 = ArrayList_init_$Create$();
|
|
986
983
|
$l$block: {
|
|
987
|
-
var _iterator__ex2g4s = cards.
|
|
988
|
-
$l$loop_0: while (_iterator__ex2g4s.
|
|
989
|
-
var card = _iterator__ex2g4s.
|
|
990
|
-
if (this_0.
|
|
984
|
+
var _iterator__ex2g4s = cards.l();
|
|
985
|
+
$l$loop_0: while (_iterator__ex2g4s.m()) {
|
|
986
|
+
var card = _iterator__ex2g4s.n();
|
|
987
|
+
if (this_0.o() === count) {
|
|
991
988
|
break $l$block;
|
|
992
989
|
}
|
|
993
|
-
var hasSimilarCard = this_0.
|
|
990
|
+
var hasSimilarCard = this_0.t1(card);
|
|
994
991
|
if (hasSimilarCard) {
|
|
995
992
|
continue $l$loop_0;
|
|
996
993
|
}
|
|
@@ -999,7 +996,7 @@
|
|
|
999
996
|
// Inline function 'kotlin.collections.any' call
|
|
1000
997
|
var tmp;
|
|
1001
998
|
if (isInterface(this_0, Collection)) {
|
|
1002
|
-
tmp = this_0.
|
|
999
|
+
tmp = this_0.r();
|
|
1003
1000
|
} else {
|
|
1004
1001
|
tmp = false;
|
|
1005
1002
|
}
|
|
@@ -1007,10 +1004,10 @@
|
|
|
1007
1004
|
tmp$ret$2 = false;
|
|
1008
1005
|
break $l$block_1;
|
|
1009
1006
|
}
|
|
1010
|
-
var _iterator__ex2g4s_0 = this_0.
|
|
1011
|
-
while (_iterator__ex2g4s_0.
|
|
1012
|
-
var element = _iterator__ex2g4s_0.
|
|
1013
|
-
if (element.
|
|
1007
|
+
var _iterator__ex2g4s_0 = this_0.l();
|
|
1008
|
+
while (_iterator__ex2g4s_0.m()) {
|
|
1009
|
+
var element = _iterator__ex2g4s_0.n();
|
|
1010
|
+
if (element.s5d() === card.s5d()) {
|
|
1014
1011
|
tmp$ret$2 = true;
|
|
1015
1012
|
break $l$block_1;
|
|
1016
1013
|
}
|
|
@@ -1020,12 +1017,12 @@
|
|
|
1020
1017
|
if (tmp$ret$2) {
|
|
1021
1018
|
continue $l$loop_0;
|
|
1022
1019
|
}
|
|
1023
|
-
this_0.
|
|
1020
|
+
this_0.j(card);
|
|
1024
1021
|
}
|
|
1025
1022
|
}
|
|
1026
1023
|
return this_0;
|
|
1027
1024
|
};
|
|
1028
|
-
protoOf(CardsDealerProviderImpl).
|
|
1025
|
+
protoOf(CardsDealerProviderImpl).l5e = function (cards, times) {
|
|
1029
1026
|
// Inline function 'kotlin.let' call
|
|
1030
1027
|
var shuffled = toMutableList(cards);
|
|
1031
1028
|
var inductionVariable = 0;
|
|
@@ -1033,72 +1030,72 @@
|
|
|
1033
1030
|
do {
|
|
1034
1031
|
var i = inductionVariable;
|
|
1035
1032
|
inductionVariable = inductionVariable + 1 | 0;
|
|
1036
|
-
shuffled = this.
|
|
1033
|
+
shuffled = this.v5f_1.o5d(shuffled);
|
|
1037
1034
|
}
|
|
1038
1035
|
while (inductionVariable < times);
|
|
1039
1036
|
return shuffled;
|
|
1040
1037
|
};
|
|
1041
|
-
protoOf(CardsDealerProviderImpl).
|
|
1042
|
-
return toList(overhand(riffle(toMutableList(cards), times, this.
|
|
1038
|
+
protoOf(CardsDealerProviderImpl).n5e = function (cards, times) {
|
|
1039
|
+
return toList(overhand(riffle(toMutableList(cards), times, this.v5f_1), times, this.v5f_1));
|
|
1043
1040
|
};
|
|
1044
1041
|
function Companion_3() {
|
|
1045
1042
|
}
|
|
1046
|
-
protoOf(Companion_3).
|
|
1043
|
+
protoOf(Companion_3).z5f = function () {
|
|
1047
1044
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
1048
1045
|
// Inline function 'kotlin.apply' call
|
|
1049
1046
|
var this_0 = ArrayList_init_$Create$();
|
|
1050
|
-
this_0.
|
|
1051
|
-
this_0.
|
|
1052
|
-
this_0.
|
|
1053
|
-
this_0.
|
|
1054
|
-
this_0.
|
|
1047
|
+
this_0.q(listOf([Companion_instance.u5d(Suit_DIAMOND_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.u5d(Suit_CLUB_getInstance(), CardName_NINE_getInstance()), Companion_instance.u5d(Suit_CLUB_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.u5d(Suit_CLUB_getInstance(), CardName_TEN_getInstance()), Companion_instance.u5d(Suit_HEART_getInstance(), CardName_JACK_getInstance()), Companion_instance.u5d(Suit_HEART_getInstance(), CardName_KING_getInstance())]));
|
|
1048
|
+
this_0.q(listOf([Companion_instance.u5d(Suit_CLUB_getInstance(), CardName_JACK_getInstance()), Companion_instance.u5d(Suit_SPADE_getInstance(), CardName_ACE_getInstance()), Companion_instance.u5d(Suit_DIAMOND_getInstance(), CardName_NINE_getInstance()), Companion_instance.u5d(Suit_DIAMOND_getInstance(), CardName_TEN_getInstance()), Companion_instance.u5d(Suit_DIAMOND_getInstance(), CardName_JACK_getInstance()), Companion_instance.u5d(Suit_HEART_getInstance(), CardName_EIGHT_getInstance())]));
|
|
1049
|
+
this_0.q(listOf([Companion_instance.u5d(Suit_CLUB_getInstance(), CardName_QUEEN_getInstance()), Companion_instance.u5d(Suit_HEART_getInstance(), CardName_ACE_getInstance()), Companion_instance.u5d(Suit_HEART_getInstance(), CardName_QUEEN_getInstance()), Companion_instance.u5d(Suit_HEART_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.u5d(Suit_SPADE_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.u5d(Suit_CLUB_getInstance(), CardName_KING_getInstance())]));
|
|
1050
|
+
this_0.q(listOf([Companion_instance.u5d(Suit_SPADE_getInstance(), CardName_EIGHT_getInstance()), Companion_instance.u5d(Suit_SPADE_getInstance(), CardName_TEN_getInstance()), Companion_instance.u5d(Suit_HEART_getInstance(), CardName_TEN_getInstance()), Companion_instance.u5d(Suit_SPADE_getInstance(), CardName_JACK_getInstance()), Companion_instance.u5d(Suit_DIAMOND_getInstance(), CardName_EIGHT_getInstance()), Companion_instance.u5d(Suit_SPADE_getInstance(), CardName_QUEEN_getInstance())]));
|
|
1051
|
+
this_0.q(listOf([Companion_instance.u5d(Suit_DIAMOND_getInstance(), CardName_ACE_getInstance()), Companion_instance.u5d(Suit_CLUB_getInstance(), CardName_EIGHT_getInstance()), Companion_instance.u5d(Suit_DIAMOND_getInstance(), CardName_KING_getInstance()), Companion_instance.u5d(Suit_SPADE_getInstance(), CardName_NINE_getInstance()), Companion_instance.u5d(Suit_CLUB_getInstance(), CardName_ACE_getInstance()), Companion_instance.u5d(Suit_SPADE_getInstance(), CardName_KING_getInstance()), Companion_instance.u5d(Suit_DIAMOND_getInstance(), CardName_QUEEN_getInstance()), Companion_instance.u5d(Suit_HEART_getInstance(), CardName_NINE_getInstance())]));
|
|
1055
1052
|
return this_0;
|
|
1056
1053
|
};
|
|
1057
|
-
protoOf(Companion_3).
|
|
1058
|
-
return listOf([Companion_instance.
|
|
1054
|
+
protoOf(Companion_3).a5g = function () {
|
|
1055
|
+
return listOf([Companion_instance.u5d(Suit_CLUB_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.u5d(Suit_HEART_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.u5d(Suit_SPADE_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.u5d(Suit_SPADE_getInstance(), CardName_EIGHT_getInstance())]);
|
|
1059
1056
|
};
|
|
1060
1057
|
var Companion_instance_3;
|
|
1061
1058
|
function Companion_getInstance_3() {
|
|
1062
1059
|
return Companion_instance_3;
|
|
1063
1060
|
}
|
|
1064
1061
|
function FakeCardsDealerProvider(cards, cardsForLot) {
|
|
1065
|
-
cards = cards === VOID ? Companion_instance_3.
|
|
1066
|
-
cardsForLot = cardsForLot === VOID ? Companion_instance_3.
|
|
1067
|
-
this.
|
|
1068
|
-
this.
|
|
1062
|
+
cards = cards === VOID ? Companion_instance_3.z5f() : cards;
|
|
1063
|
+
cardsForLot = cardsForLot === VOID ? Companion_instance_3.a5g() : cardsForLot;
|
|
1064
|
+
this.b5g_1 = cards;
|
|
1065
|
+
this.c5g_1 = cardsForLot;
|
|
1069
1066
|
}
|
|
1070
|
-
protoOf(FakeCardsDealerProvider).
|
|
1071
|
-
return this.
|
|
1067
|
+
protoOf(FakeCardsDealerProvider).i5e = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit) {
|
|
1068
|
+
return this.b5g_1;
|
|
1072
1069
|
};
|
|
1073
|
-
protoOf(FakeCardsDealerProvider).
|
|
1074
|
-
return this.
|
|
1070
|
+
protoOf(FakeCardsDealerProvider).j5e = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundCountForGame, userData, provider, $completion) {
|
|
1071
|
+
return this.b5g_1;
|
|
1075
1072
|
};
|
|
1076
|
-
protoOf(FakeCardsDealerProvider).
|
|
1077
|
-
return this.
|
|
1073
|
+
protoOf(FakeCardsDealerProvider).k5e = function (count, cards) {
|
|
1074
|
+
return this.c5g_1;
|
|
1078
1075
|
};
|
|
1079
|
-
protoOf(FakeCardsDealerProvider).
|
|
1076
|
+
protoOf(FakeCardsDealerProvider).l5e = function (cards, times) {
|
|
1080
1077
|
return cards;
|
|
1081
1078
|
};
|
|
1082
|
-
protoOf(FakeCardsDealerProvider).
|
|
1079
|
+
protoOf(FakeCardsDealerProvider).n5e = function (cards, times) {
|
|
1083
1080
|
return cards;
|
|
1084
1081
|
};
|
|
1085
|
-
protoOf(FakeCardsDealerProvider).
|
|
1086
|
-
return this.
|
|
1082
|
+
protoOf(FakeCardsDealerProvider).p5e = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit) {
|
|
1083
|
+
return this.b5g_1.o();
|
|
1087
1084
|
};
|
|
1088
1085
|
function CombinationsCheckerProvider() {
|
|
1089
1086
|
}
|
|
1090
1087
|
function createCombination($this, cards, supportedCombinations) {
|
|
1091
|
-
var size = cards.
|
|
1092
|
-
if (supportedCombinations.
|
|
1088
|
+
var size = cards.o();
|
|
1089
|
+
if (supportedCombinations.t1(size)) {
|
|
1093
1090
|
return cards;
|
|
1094
1091
|
}
|
|
1095
1092
|
var fromLongestCombinations = asReversed(sorted(supportedCombinations));
|
|
1096
1093
|
var tmp$ret$1;
|
|
1097
1094
|
$l$block: {
|
|
1098
1095
|
// Inline function 'kotlin.collections.first' call
|
|
1099
|
-
var _iterator__ex2g4s = fromLongestCombinations.
|
|
1100
|
-
while (_iterator__ex2g4s.
|
|
1101
|
-
var element = _iterator__ex2g4s.
|
|
1096
|
+
var _iterator__ex2g4s = fromLongestCombinations.l();
|
|
1097
|
+
while (_iterator__ex2g4s.m()) {
|
|
1098
|
+
var element = _iterator__ex2g4s.n();
|
|
1102
1099
|
if (element <= size) {
|
|
1103
1100
|
tmp$ret$1 = element;
|
|
1104
1101
|
break $l$block;
|
|
@@ -1110,23 +1107,23 @@
|
|
|
1110
1107
|
return takeLast(cards, longestCombinationSupport);
|
|
1111
1108
|
}
|
|
1112
1109
|
function sam$kotlin_Comparator$0(function_0) {
|
|
1113
|
-
this.
|
|
1110
|
+
this.i5g_1 = function_0;
|
|
1114
1111
|
}
|
|
1115
|
-
protoOf(sam$kotlin_Comparator$0).
|
|
1116
|
-
return this.
|
|
1112
|
+
protoOf(sam$kotlin_Comparator$0).ec = function (a, b) {
|
|
1113
|
+
return this.i5g_1(a, b);
|
|
1117
1114
|
};
|
|
1118
1115
|
protoOf(sam$kotlin_Comparator$0).compare = function (a, b) {
|
|
1119
|
-
return this.
|
|
1116
|
+
return this.ec(a, b);
|
|
1120
1117
|
};
|
|
1121
|
-
protoOf(sam$kotlin_Comparator$0).
|
|
1122
|
-
return this.
|
|
1118
|
+
protoOf(sam$kotlin_Comparator$0).a3 = function () {
|
|
1119
|
+
return this.i5g_1;
|
|
1123
1120
|
};
|
|
1124
1121
|
protoOf(sam$kotlin_Comparator$0).equals = function (other) {
|
|
1125
1122
|
var tmp;
|
|
1126
1123
|
if (!(other == null) ? isInterface(other, Comparator) : false) {
|
|
1127
1124
|
var tmp_0;
|
|
1128
1125
|
if (!(other == null) ? isInterface(other, FunctionAdapter) : false) {
|
|
1129
|
-
tmp_0 = equals(this.
|
|
1126
|
+
tmp_0 = equals(this.a3(), other.a3());
|
|
1130
1127
|
} else {
|
|
1131
1128
|
tmp_0 = false;
|
|
1132
1129
|
}
|
|
@@ -1137,28 +1134,28 @@
|
|
|
1137
1134
|
return tmp;
|
|
1138
1135
|
};
|
|
1139
1136
|
protoOf(sam$kotlin_Comparator$0).hashCode = function () {
|
|
1140
|
-
return hashCode(this.
|
|
1137
|
+
return hashCode(this.a3());
|
|
1141
1138
|
};
|
|
1142
1139
|
function CombinationsCheckerProviderImpl$createCombinationsFromCardsInRow$lambda(a, b) {
|
|
1143
1140
|
// Inline function 'kotlin.comparisons.compareValuesBy' call
|
|
1144
|
-
var tmp = first_0(a).
|
|
1145
|
-
var tmp$ret$1 = first_0(b).
|
|
1141
|
+
var tmp = first_0(a).r5d_1;
|
|
1142
|
+
var tmp$ret$1 = first_0(b).r5d_1;
|
|
1146
1143
|
return compareValues(tmp, tmp$ret$1);
|
|
1147
1144
|
}
|
|
1148
1145
|
function CombinationsCheckerProviderImpl() {
|
|
1149
1146
|
}
|
|
1150
|
-
protoOf(CombinationsCheckerProviderImpl).
|
|
1147
|
+
protoOf(CombinationsCheckerProviderImpl).d5g = function (cards, supportedCombinations, checkFromIndex, includeCardNames, suit) {
|
|
1151
1148
|
// Inline function 'kotlin.apply' call
|
|
1152
1149
|
var this_0 = toMutableList(cards);
|
|
1153
1150
|
sortWith(this_0, CardIndexComparator_instance);
|
|
1154
1151
|
// Inline function 'kotlin.collections.filter' call
|
|
1155
1152
|
// Inline function 'kotlin.collections.filterTo' call
|
|
1156
1153
|
var destination = ArrayList_init_$Create$();
|
|
1157
|
-
var _iterator__ex2g4s = this_0.
|
|
1158
|
-
while (_iterator__ex2g4s.
|
|
1159
|
-
var element = _iterator__ex2g4s.
|
|
1160
|
-
if (element.
|
|
1161
|
-
destination.
|
|
1154
|
+
var _iterator__ex2g4s = this_0.l();
|
|
1155
|
+
while (_iterator__ex2g4s.m()) {
|
|
1156
|
+
var element = _iterator__ex2g4s.n();
|
|
1157
|
+
if (element.g5e()) {
|
|
1158
|
+
destination.j(element);
|
|
1162
1159
|
}
|
|
1163
1160
|
}
|
|
1164
1161
|
var sortedByIndexCards = toList(destination);
|
|
@@ -1167,110 +1164,110 @@
|
|
|
1167
1164
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
1168
1165
|
var combinationCards = ArrayList_init_$Create$();
|
|
1169
1166
|
var inductionVariable = 0;
|
|
1170
|
-
var last = sortedByIndexCards.
|
|
1167
|
+
var last = sortedByIndexCards.o() - 1 | 0;
|
|
1171
1168
|
if (inductionVariable <= last)
|
|
1172
1169
|
do {
|
|
1173
1170
|
var i = inductionVariable;
|
|
1174
1171
|
inductionVariable = inductionVariable + 1 | 0;
|
|
1175
1172
|
var previousCard = lastOrNull(combinationCards);
|
|
1176
|
-
var currentCard = sortedByIndexCards.
|
|
1177
|
-
var isNextInRow = !(previousCard == null) && currentCard.
|
|
1178
|
-
var passedCardNamesCheck = includeCardNames == null || includeCardNames.
|
|
1179
|
-
var passedSuitCheck = suit == null || currentCard.
|
|
1173
|
+
var currentCard = sortedByIndexCards.p(i);
|
|
1174
|
+
var isNextInRow = !(previousCard == null) && currentCard.r5d_1 === (previousCard.r5d_1 + 1 | 0) && currentCard.f5e().equals(previousCard.f5e());
|
|
1175
|
+
var passedCardNamesCheck = includeCardNames == null || includeCardNames.t1(currentCard.q2());
|
|
1176
|
+
var passedSuitCheck = suit == null || currentCard.f5e().equals(suit);
|
|
1180
1177
|
if (isNextInRow && passedSuitCheck && passedCardNamesCheck) {
|
|
1181
|
-
combinationCards.
|
|
1178
|
+
combinationCards.j(currentCard);
|
|
1182
1179
|
} else {
|
|
1183
|
-
if (combinationCards.
|
|
1184
|
-
combinations.
|
|
1180
|
+
if (combinationCards.o() > (checkFromIndex - 1 | 0)) {
|
|
1181
|
+
combinations.q(this.h5g(toMutableList(combinationCards), supportedCombinations));
|
|
1185
1182
|
}
|
|
1186
|
-
combinationCards.
|
|
1183
|
+
combinationCards.h2();
|
|
1187
1184
|
if (passedSuitCheck && passedCardNamesCheck) {
|
|
1188
|
-
combinationCards.
|
|
1185
|
+
combinationCards.j(currentCard);
|
|
1189
1186
|
}
|
|
1190
1187
|
}
|
|
1191
1188
|
}
|
|
1192
1189
|
while (inductionVariable <= last);
|
|
1193
|
-
if (combinationCards.
|
|
1194
|
-
combinations.
|
|
1190
|
+
if (combinationCards.o() > (checkFromIndex - 1 | 0)) {
|
|
1191
|
+
combinations.q(this.h5g(toMutableList(combinationCards), supportedCombinations));
|
|
1195
1192
|
}
|
|
1196
1193
|
return combinations;
|
|
1197
1194
|
};
|
|
1198
|
-
protoOf(CombinationsCheckerProviderImpl).
|
|
1195
|
+
protoOf(CombinationsCheckerProviderImpl).f5g = function (cards, cardsCount, includeCardNames) {
|
|
1199
1196
|
// Inline function 'kotlin.apply' call
|
|
1200
1197
|
var this_0 = toMutableList(cards);
|
|
1201
1198
|
sortWith(this_0, CardIndexComparator_instance);
|
|
1202
1199
|
// Inline function 'kotlin.collections.filter' call
|
|
1203
1200
|
// Inline function 'kotlin.collections.filterTo' call
|
|
1204
1201
|
var destination = ArrayList_init_$Create$();
|
|
1205
|
-
var _iterator__ex2g4s = this_0.
|
|
1206
|
-
while (_iterator__ex2g4s.
|
|
1207
|
-
var element = _iterator__ex2g4s.
|
|
1208
|
-
if (element.
|
|
1209
|
-
destination.
|
|
1202
|
+
var _iterator__ex2g4s = this_0.l();
|
|
1203
|
+
while (_iterator__ex2g4s.m()) {
|
|
1204
|
+
var element = _iterator__ex2g4s.n();
|
|
1205
|
+
if (element.g5e()) {
|
|
1206
|
+
destination.j(element);
|
|
1210
1207
|
}
|
|
1211
1208
|
}
|
|
1212
1209
|
// Inline function 'kotlin.collections.filter' call
|
|
1213
1210
|
// Inline function 'kotlin.collections.filterTo' call
|
|
1214
1211
|
var destination_0 = ArrayList_init_$Create$();
|
|
1215
|
-
var _iterator__ex2g4s_0 = destination.
|
|
1216
|
-
while (_iterator__ex2g4s_0.
|
|
1217
|
-
var element_0 = _iterator__ex2g4s_0.
|
|
1218
|
-
if (includeCardNames == null || includeCardNames.
|
|
1219
|
-
destination_0.
|
|
1212
|
+
var _iterator__ex2g4s_0 = destination.l();
|
|
1213
|
+
while (_iterator__ex2g4s_0.m()) {
|
|
1214
|
+
var element_0 = _iterator__ex2g4s_0.n();
|
|
1215
|
+
if (includeCardNames == null || includeCardNames.t1(element_0.q2())) {
|
|
1216
|
+
destination_0.j(element_0);
|
|
1220
1217
|
}
|
|
1221
1218
|
}
|
|
1222
1219
|
var sortedByNumberCards = toList(destination_0);
|
|
1223
1220
|
// Inline function 'kotlin.collections.groupBy' call
|
|
1224
1221
|
// Inline function 'kotlin.collections.groupByTo' call
|
|
1225
1222
|
var destination_1 = LinkedHashMap_init_$Create$();
|
|
1226
|
-
var _iterator__ex2g4s_1 = sortedByNumberCards.
|
|
1227
|
-
while (_iterator__ex2g4s_1.
|
|
1228
|
-
var element_1 = _iterator__ex2g4s_1.
|
|
1229
|
-
var key = element_1.
|
|
1223
|
+
var _iterator__ex2g4s_1 = sortedByNumberCards.l();
|
|
1224
|
+
while (_iterator__ex2g4s_1.m()) {
|
|
1225
|
+
var element_1 = _iterator__ex2g4s_1.n();
|
|
1226
|
+
var key = element_1.s5d();
|
|
1230
1227
|
// Inline function 'kotlin.collections.getOrPut' call
|
|
1231
|
-
var value = destination_1.
|
|
1228
|
+
var value = destination_1.b2(key);
|
|
1232
1229
|
var tmp;
|
|
1233
1230
|
if (value == null) {
|
|
1234
1231
|
var answer = ArrayList_init_$Create$();
|
|
1235
|
-
destination_1.
|
|
1232
|
+
destination_1.e2(key, answer);
|
|
1236
1233
|
tmp = answer;
|
|
1237
1234
|
} else {
|
|
1238
1235
|
tmp = value;
|
|
1239
1236
|
}
|
|
1240
1237
|
var list = tmp;
|
|
1241
|
-
list.
|
|
1238
|
+
list.j(element_1);
|
|
1242
1239
|
}
|
|
1243
1240
|
// Inline function 'kotlin.collections.filter' call
|
|
1244
1241
|
// Inline function 'kotlin.collections.filterTo' call
|
|
1245
1242
|
var destination_2 = LinkedHashMap_init_$Create$();
|
|
1246
1243
|
// Inline function 'kotlin.collections.iterator' call
|
|
1247
|
-
var _iterator__ex2g4s_2 = destination_1.
|
|
1248
|
-
while (_iterator__ex2g4s_2.
|
|
1249
|
-
var element_2 = _iterator__ex2g4s_2.
|
|
1250
|
-
if (element_2.
|
|
1251
|
-
destination_2.
|
|
1244
|
+
var _iterator__ex2g4s_2 = destination_1.u().l();
|
|
1245
|
+
while (_iterator__ex2g4s_2.m()) {
|
|
1246
|
+
var element_2 = _iterator__ex2g4s_2.n();
|
|
1247
|
+
if (element_2.w().o() >= cardsCount) {
|
|
1248
|
+
destination_2.e2(element_2.v(), element_2.w());
|
|
1252
1249
|
}
|
|
1253
1250
|
}
|
|
1254
|
-
var combinations = destination_2.
|
|
1251
|
+
var combinations = destination_2.d2();
|
|
1255
1252
|
// Inline function 'kotlin.collections.map' call
|
|
1256
1253
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1257
1254
|
var destination_3 = ArrayList_init_$Create$_0(collectionSizeOrDefault(combinations, 10));
|
|
1258
|
-
var _iterator__ex2g4s_3 = combinations.
|
|
1259
|
-
while (_iterator__ex2g4s_3.
|
|
1260
|
-
var item = _iterator__ex2g4s_3.
|
|
1255
|
+
var _iterator__ex2g4s_3 = combinations.l();
|
|
1256
|
+
while (_iterator__ex2g4s_3.m()) {
|
|
1257
|
+
var item = _iterator__ex2g4s_3.n();
|
|
1261
1258
|
var tmp$ret$17 = sortedWith(item, CardIndexComparator_instance);
|
|
1262
|
-
destination_3.
|
|
1259
|
+
destination_3.j(tmp$ret$17);
|
|
1263
1260
|
}
|
|
1264
1261
|
return destination_3;
|
|
1265
1262
|
};
|
|
1266
|
-
protoOf(CombinationsCheckerProviderImpl).
|
|
1263
|
+
protoOf(CombinationsCheckerProviderImpl).h5g = function (cards, supportedCombinations) {
|
|
1267
1264
|
// Inline function 'kotlin.collections.minOf' call
|
|
1268
|
-
var iterator = supportedCombinations.
|
|
1269
|
-
if (!iterator.
|
|
1265
|
+
var iterator = supportedCombinations.l();
|
|
1266
|
+
if (!iterator.m())
|
|
1270
1267
|
throw NoSuchElementException_init_$Create$_0();
|
|
1271
|
-
var minValue = iterator.
|
|
1272
|
-
while (iterator.
|
|
1273
|
-
var v = iterator.
|
|
1268
|
+
var minValue = iterator.n();
|
|
1269
|
+
while (iterator.m()) {
|
|
1270
|
+
var v = iterator.n();
|
|
1274
1271
|
if (compareTo(minValue, v) > 0) {
|
|
1275
1272
|
minValue = v;
|
|
1276
1273
|
}
|
|
@@ -1279,10 +1276,10 @@
|
|
|
1279
1276
|
var cardsToCheck = toMutableList(cards);
|
|
1280
1277
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
1281
1278
|
var combinations = ArrayList_init_$Create$();
|
|
1282
|
-
while (cardsToCheck.
|
|
1279
|
+
while (cardsToCheck.o() >= shortestCombinationSupport) {
|
|
1283
1280
|
var combinationCards = createCombination(this, cardsToCheck, supportedCombinations);
|
|
1284
|
-
combinations.
|
|
1285
|
-
cardsToCheck.
|
|
1281
|
+
combinations.j(toList(combinationCards));
|
|
1282
|
+
cardsToCheck.k2(combinationCards);
|
|
1286
1283
|
}
|
|
1287
1284
|
// Inline function 'kotlin.collections.sortedBy' call
|
|
1288
1285
|
// Inline function 'kotlin.comparisons.compareBy' call
|
|
@@ -1293,74 +1290,74 @@
|
|
|
1293
1290
|
function DealerReducer() {
|
|
1294
1291
|
}
|
|
1295
1292
|
function DealerReducerImpl(logger, enableLogs) {
|
|
1296
|
-
this.
|
|
1297
|
-
this.
|
|
1293
|
+
this.m5g_1 = logger;
|
|
1294
|
+
this.n5g_1 = enableLogs;
|
|
1298
1295
|
}
|
|
1299
|
-
protoOf(DealerReducerImpl).
|
|
1296
|
+
protoOf(DealerReducerImpl).j5g = function (cards, cardsToRemove) {
|
|
1300
1297
|
var list = cards;
|
|
1301
|
-
var _iterator__ex2g4s = cardsToRemove.
|
|
1302
|
-
while (_iterator__ex2g4s.
|
|
1303
|
-
var gameCard = _iterator__ex2g4s.
|
|
1304
|
-
list = this.
|
|
1298
|
+
var _iterator__ex2g4s = cardsToRemove.l();
|
|
1299
|
+
while (_iterator__ex2g4s.m()) {
|
|
1300
|
+
var gameCard = _iterator__ex2g4s.n();
|
|
1301
|
+
list = this.k5g(list, gameCard);
|
|
1305
1302
|
}
|
|
1306
1303
|
return list;
|
|
1307
1304
|
};
|
|
1308
|
-
protoOf(DealerReducerImpl).
|
|
1305
|
+
protoOf(DealerReducerImpl).k5g = function (cards, cardToRemove) {
|
|
1309
1306
|
var tmp;
|
|
1310
|
-
if (!cardToRemove.
|
|
1311
|
-
if (this.
|
|
1312
|
-
this.
|
|
1307
|
+
if (!cardToRemove.x5d() && cards.t1(cardToRemove)) {
|
|
1308
|
+
if (this.n5g_1) {
|
|
1309
|
+
this.m5g_1.d('Dealer', 'Card removed: ' + cardToRemove.toString() + ', size: ' + (cards.o() - 1 | 0));
|
|
1313
1310
|
}
|
|
1314
1311
|
tmp = minus(cards, cardToRemove);
|
|
1315
1312
|
} else {
|
|
1316
|
-
if (this.
|
|
1317
|
-
this.
|
|
1313
|
+
if (this.n5g_1) {
|
|
1314
|
+
this.m5g_1.d('Dealer', 'Card removed as hidden: ' + cardToRemove.toString() + ', size: ' + (cards.o() - 1 | 0));
|
|
1318
1315
|
}
|
|
1319
1316
|
// Inline function 'kotlin.collections.filterNot' call
|
|
1320
1317
|
// Inline function 'kotlin.collections.filterNotTo' call
|
|
1321
1318
|
var destination = ArrayList_init_$Create$();
|
|
1322
|
-
var _iterator__ex2g4s = cards.
|
|
1323
|
-
while (_iterator__ex2g4s.
|
|
1324
|
-
var element = _iterator__ex2g4s.
|
|
1325
|
-
if (!element.
|
|
1326
|
-
destination.
|
|
1319
|
+
var _iterator__ex2g4s = cards.l();
|
|
1320
|
+
while (_iterator__ex2g4s.m()) {
|
|
1321
|
+
var element = _iterator__ex2g4s.n();
|
|
1322
|
+
if (!element.x5d()) {
|
|
1323
|
+
destination.j(element);
|
|
1327
1324
|
}
|
|
1328
1325
|
}
|
|
1329
1326
|
var notHiddenCards = destination;
|
|
1330
1327
|
// Inline function 'kotlin.collections.filter' call
|
|
1331
1328
|
// Inline function 'kotlin.collections.filterTo' call
|
|
1332
1329
|
var destination_0 = ArrayList_init_$Create$();
|
|
1333
|
-
var _iterator__ex2g4s_0 = cards.
|
|
1334
|
-
while (_iterator__ex2g4s_0.
|
|
1335
|
-
var element_0 = _iterator__ex2g4s_0.
|
|
1336
|
-
if (element_0.
|
|
1337
|
-
destination_0.
|
|
1330
|
+
var _iterator__ex2g4s_0 = cards.l();
|
|
1331
|
+
while (_iterator__ex2g4s_0.m()) {
|
|
1332
|
+
var element_0 = _iterator__ex2g4s_0.n();
|
|
1333
|
+
if (element_0.x5d()) {
|
|
1334
|
+
destination_0.j(element_0);
|
|
1338
1335
|
}
|
|
1339
1336
|
}
|
|
1340
1337
|
var hiddenCards = destination_0;
|
|
1341
|
-
if (hiddenCards.
|
|
1342
|
-
this.
|
|
1338
|
+
if (hiddenCards.r()) {
|
|
1339
|
+
this.m5g_1.w('Dealer', "Can't find card to delete for player, " + ('cards:' + toString(cards) + ', ') + ('cardToRemove: ' + cardToRemove.toString()));
|
|
1343
1340
|
}
|
|
1344
1341
|
tmp = plus(notHiddenCards, dropLast(hiddenCards, 1));
|
|
1345
1342
|
}
|
|
1346
1343
|
return tmp;
|
|
1347
1344
|
};
|
|
1348
|
-
protoOf(DealerReducerImpl).
|
|
1349
|
-
if (this.
|
|
1350
|
-
this.
|
|
1345
|
+
protoOf(DealerReducerImpl).l5g = function (cards, cardToAdd) {
|
|
1346
|
+
if (this.n5g_1) {
|
|
1347
|
+
this.m5g_1.d('Dealer', 'Card added: ' + cardToAdd.toString() + ', size: ' + (cards.o() + 1 | 0));
|
|
1351
1348
|
}
|
|
1352
|
-
if (cards.
|
|
1353
|
-
this.
|
|
1349
|
+
if (cards.t1(cardToAdd)) {
|
|
1350
|
+
this.m5g_1.w('Dealer', 'Card already exists for player, ' + ('cards:' + toString(cards) + ', ') + ('cardToAdd: ' + cardToAdd.toString()));
|
|
1354
1351
|
}
|
|
1355
1352
|
return plus_0(cards, cardToAdd);
|
|
1356
1353
|
};
|
|
1357
1354
|
//region block: post-declaration
|
|
1358
|
-
protoOf(CardsDealerProviderImpl).
|
|
1359
|
-
protoOf(CardsDealerProviderImpl).
|
|
1360
|
-
protoOf(FakeCardsDealerProvider).
|
|
1361
|
-
protoOf(FakeCardsDealerProvider).
|
|
1362
|
-
protoOf(CombinationsCheckerProviderImpl).
|
|
1363
|
-
protoOf(CombinationsCheckerProviderImpl).
|
|
1355
|
+
protoOf(CardsDealerProviderImpl).m5e = standardShuffledCards$default;
|
|
1356
|
+
protoOf(CardsDealerProviderImpl).o5e = realLifeShuffledCards$default;
|
|
1357
|
+
protoOf(FakeCardsDealerProvider).m5e = standardShuffledCards$default;
|
|
1358
|
+
protoOf(FakeCardsDealerProvider).o5e = realLifeShuffledCards$default;
|
|
1359
|
+
protoOf(CombinationsCheckerProviderImpl).e5g = findCardsInRowCombinations$default;
|
|
1360
|
+
protoOf(CombinationsCheckerProviderImpl).g5g = findSameCardsNumberCombinations$default;
|
|
1364
1361
|
//endregion
|
|
1365
1362
|
//region block: init
|
|
1366
1363
|
CoreConfig_instance = new CoreConfig();
|
|
@@ -1377,7 +1374,7 @@
|
|
|
1377
1374
|
var $io$raspberryapps = $io.raspberryapps || ($io.raspberryapps = {});
|
|
1378
1375
|
var $io$raspberryapps$cardgame = $io$raspberryapps.cardgame || ($io$raspberryapps.cardgame = {});
|
|
1379
1376
|
var $io$raspberryapps$cardgame$core = $io$raspberryapps$cardgame.core || ($io$raspberryapps$cardgame.core = {});
|
|
1380
|
-
defineProp($io$raspberryapps$cardgame$core, 'CoreConfig', CoreConfig_getInstance);
|
|
1377
|
+
defineProp($io$raspberryapps$cardgame$core, 'CoreConfig', CoreConfig_getInstance, VOID, true);
|
|
1381
1378
|
}
|
|
1382
1379
|
$jsExportAll$(_);
|
|
1383
1380
|
_.$jsExportAll$ = $jsExportAll$;
|