raspberry_games_server_game_logic 1.8.342 → 1.8.345
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 +105 -117
- package/Kosi-Kaverit-kaverit.js.map +1 -1
- package/Kosi-Kodein-kodein-di.js +935 -945
- package/Kosi-Kodein-kodein-di.js.map +1 -1
- package/Kotlin-DateTime-library-kotlinx-datetime.js +4637 -3658
- package/Kotlin-DateTime-library-kotlinx-datetime.js.map +1 -1
- package/Logic_Debertz-core.js +1909 -1936
- package/Logic_Debertz-core.js.map +1 -1
- package/Logic_Debertz-engine.js +18559 -19039
- package/Logic_Debertz-engine.js.map +1 -1
- package/Logic_Debertz-game_server.d.ts +934 -167
- package/Logic_Debertz-game_server.js +2061 -2015
- package/Logic_Debertz-game_server.js.map +1 -1
- package/kotlin-kotlin-stdlib.js +4834 -4537
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js.map +1 -1
- package/kotlinx-atomicfu.js +25 -26
- package/kotlinx-atomicfu.js.map +1 -1
- package/kotlinx-coroutines-core.js +3201 -3379
- package/kotlinx-coroutines-core.js.map +1 -1
- package/kotlinx-io-kotlinx-io-bytestring.js.map +1 -1
- package/kotlinx-io-kotlinx-io-core.js +459 -523
- package/kotlinx-io-kotlinx-io-core.js.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-core.js +2372 -2414
- package/kotlinx-serialization-kotlinx-serialization-core.js.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-json.js +1963 -1977
- package/kotlinx-serialization-kotlinx-serialization-json.js.map +1 -1
- package/ktor-ktor-client-content-negotiation.js +194 -194
- package/ktor-ktor-client-content-negotiation.js.map +1 -1
- package/ktor-ktor-client-core.js +1902 -1937
- package/ktor-ktor-client-core.js.map +1 -1
- package/ktor-ktor-client-js.js.map +1 -1
- package/ktor-ktor-client-logging.js +393 -399
- package/ktor-ktor-client-logging.js.map +1 -1
- package/ktor-ktor-events.js +12 -15
- package/ktor-ktor-events.js.map +1 -1
- package/ktor-ktor-http.js +964 -1154
- package/ktor-ktor-http.js.map +1 -1
- package/ktor-ktor-io.js +1715 -1825
- 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 +238 -243
- package/ktor-ktor-serialization-kotlinx.js.map +1 -1
- package/ktor-ktor-serialization.js +100 -96
- package/ktor-ktor-serialization.js.map +1 -1
- package/ktor-ktor-utils.js +655 -689
- package/ktor-ktor-utils.js.map +1 -1
- package/ktor-ktor-websocket-serialization.js.map +1 -1
- package/ktor-ktor-websockets.js +71 -77
- package/ktor-ktor-websockets.js.map +1 -1
- package/package.json +1 -2
- package/raspberry-cardgame-lib-core.js +326 -360
- package/raspberry-cardgame-lib-core.js.map +1 -1
- package/raspberry-cardgame-lib-logger.js +148 -119
- package/raspberry-cardgame-lib-logger.js.map +1 -1
- package/raspberry-cardgame-lib-random.js +965 -1034
- package/raspberry-cardgame-lib-random.js.map +1 -1
- package/secure-random-secure-random.js +36 -35
- package/secure-random-secure-random.js.map +1 -1
- package/uuid.js +35 -39
- package/uuid.js.map +1 -1
- package/kotlin-kotlinx-atomicfu-runtime.js +0 -15
- package/kotlin-kotlinx-atomicfu-runtime.js.map +0 -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 THROW_CCE = kotlin_kotlin.$_$.
|
|
26
|
-
var Comparator = kotlin_kotlin.$_$.
|
|
22
|
+
var protoOf = kotlin_kotlin.$_$.pc;
|
|
23
|
+
var initMetadataForObject = kotlin_kotlin.$_$.tb;
|
|
24
|
+
var defineProp = kotlin_kotlin.$_$.gb;
|
|
25
|
+
var THROW_CCE = kotlin_kotlin.$_$.og;
|
|
26
|
+
var Comparator = kotlin_kotlin.$_$.bg;
|
|
27
27
|
var VOID = kotlin_kotlin.$_$.f;
|
|
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.$_$.
|
|
38
|
-
var createSimpleEnumSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.
|
|
39
|
-
var enumEntries = kotlin_kotlin.$_$.
|
|
40
|
-
var LazyThreadSafetyMode_PUBLICATION_getInstance = kotlin_kotlin.$_$.
|
|
41
|
-
var lazy = kotlin_kotlin.$_$.
|
|
42
|
-
var SerializerFactory = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.
|
|
43
|
-
var initMetadataForInterface = kotlin_kotlin.$_$.
|
|
44
|
-
var collectionSizeOrDefault = kotlin_kotlin.$_$.
|
|
45
|
-
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.
|
|
28
|
+
var take = kotlin_kotlin.$_$.i9;
|
|
29
|
+
var toList = kotlin_kotlin.$_$.m9;
|
|
30
|
+
var Unit_instance = kotlin_kotlin.$_$.i5;
|
|
31
|
+
var takeLast = kotlin_kotlin.$_$.h9;
|
|
32
|
+
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.l;
|
|
33
|
+
var noWhenBranchMatchedException = kotlin_kotlin.$_$.mh;
|
|
34
|
+
var initMetadataForCompanion = kotlin_kotlin.$_$.pb;
|
|
35
|
+
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.t1;
|
|
36
|
+
var Enum = kotlin_kotlin.$_$.eg;
|
|
37
|
+
var initMetadataForClass = kotlin_kotlin.$_$.ob;
|
|
38
|
+
var createSimpleEnumSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.h2;
|
|
39
|
+
var enumEntries = kotlin_kotlin.$_$.sa;
|
|
40
|
+
var LazyThreadSafetyMode_PUBLICATION_getInstance = kotlin_kotlin.$_$.i;
|
|
41
|
+
var lazy = kotlin_kotlin.$_$.kh;
|
|
42
|
+
var SerializerFactory = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.f2;
|
|
43
|
+
var initMetadataForInterface = kotlin_kotlin.$_$.rb;
|
|
44
|
+
var collectionSizeOrDefault = kotlin_kotlin.$_$.l6;
|
|
45
|
+
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.k;
|
|
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.$_$.qa;
|
|
48
|
+
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.ba;
|
|
49
|
+
var initMetadataForCoroutine = kotlin_kotlin.$_$.qb;
|
|
50
|
+
var Result = kotlin_kotlin.$_$.mg;
|
|
51
|
+
var Result__exceptionOrNull_impl_p6xea9 = kotlin_kotlin.$_$.x2;
|
|
52
|
+
var throwOnFailure = kotlin_kotlin.$_$.qh;
|
|
53
|
+
var _Result___get_value__impl__bjfvqg = kotlin_kotlin.$_$.a3;
|
|
54
|
+
var _Result___get_isSuccess__impl__sndoy8 = kotlin_kotlin.$_$.z2;
|
|
55
|
+
var addAll = kotlin_kotlin.$_$.z5;
|
|
56
|
+
var until = kotlin_kotlin.$_$.gd;
|
|
57
|
+
var count = kotlin_kotlin.$_$.c7;
|
|
58
|
+
var Collection = kotlin_kotlin.$_$.k5;
|
|
59
|
+
var isInterface = kotlin_kotlin.$_$.cc;
|
|
60
|
+
var toMutableList = kotlin_kotlin.$_$.q9;
|
|
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.$_$.j8;
|
|
64
|
+
var first = kotlin_kotlin.$_$.o7;
|
|
65
|
+
var sorted = kotlin_kotlin.$_$.f9;
|
|
66
|
+
var asReversed = kotlin_kotlin.$_$.d6;
|
|
67
|
+
var NoSuchElementException_init_$Create$ = kotlin_kotlin.$_$.a2;
|
|
68
|
+
var equals = kotlin_kotlin.$_$.hb;
|
|
69
|
+
var FunctionAdapter = kotlin_kotlin.$_$.ua;
|
|
70
|
+
var hashCode = kotlin_kotlin.$_$.nb;
|
|
71
|
+
var first_0 = kotlin_kotlin.$_$.n7;
|
|
72
|
+
var compareValues = kotlin_kotlin.$_$.z9;
|
|
73
|
+
var sortWith = kotlin_kotlin.$_$.d9;
|
|
74
|
+
var lastOrNull = kotlin_kotlin.$_$.d8;
|
|
75
|
+
var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.u;
|
|
76
|
+
var sortedWith = kotlin_kotlin.$_$.e9;
|
|
77
|
+
var NoSuchElementException_init_$Create$_0 = kotlin_kotlin.$_$.y1;
|
|
78
|
+
var compareTo = kotlin_kotlin.$_$.fb;
|
|
79
|
+
var toString = kotlin_kotlin.$_$.uc;
|
|
80
|
+
var dropLast = kotlin_kotlin.$_$.e7;
|
|
81
|
+
var plus = kotlin_kotlin.$_$.s8;
|
|
82
|
+
var minus = kotlin_kotlin.$_$.n8;
|
|
83
|
+
var plus_0 = kotlin_kotlin.$_$.t8;
|
|
84
84
|
//endregion
|
|
85
85
|
//region block: pre-declaration
|
|
86
86
|
initMetadataForObject(CoreConfig, 'CoreConfig');
|
|
@@ -95,16 +95,16 @@
|
|
|
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.k6c(cards, times) : $super.k6c.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.m6c(cards, times) : $super.m6c.call(this, cards, times);
|
|
103
103
|
}
|
|
104
104
|
initMetadataForInterface(CardsDealerProvider, 'CardsDealerProvider', VOID, VOID, VOID, [5]);
|
|
105
105
|
initMetadataForCompanion(Companion_2);
|
|
106
|
-
initMetadataForCoroutine($createNewShuffledCardDeckCOROUTINE
|
|
107
|
-
initMetadataForCoroutine($getRandomOrgCardsCOROUTINE
|
|
106
|
+
initMetadataForCoroutine($createNewShuffledCardDeckCOROUTINE$, CoroutineImpl);
|
|
107
|
+
initMetadataForCoroutine($getRandomOrgCardsCOROUTINE$, CoroutineImpl);
|
|
108
108
|
initMetadataForClass(CardsDealerProviderImpl, 'CardsDealerProviderImpl', VOID, VOID, [CardsDealerProvider], [5]);
|
|
109
109
|
initMetadataForCompanion(Companion_3);
|
|
110
110
|
initMetadataForClass(FakeCardsDealerProvider, 'FakeCardsDealerProvider', FakeCardsDealerProvider, VOID, [CardsDealerProvider], [5]);
|
|
@@ -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.k6e(cards, supportedCombinations, checkFromIndex, includeCardNames, suit) : $super.k6e.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.m6e(cards, cardsCount, includeCardNames) : $super.m6e.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.50';
|
|
130
130
|
}
|
|
131
|
-
protoOf(CoreConfig).
|
|
131
|
+
protoOf(CoreConfig).e32 = 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).p6b = function (a, b) {
|
|
141
|
+
return a.q6b_1 - b.q6b_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.p6b(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).p6b = function (a, b) {
|
|
154
|
+
return b.r6b() - a.r6b() | 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.p6b(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.z1(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.z1(cardsToDeal);
|
|
172
172
|
return cardsToDeal;
|
|
173
173
|
}
|
|
174
174
|
function filterByCardName(_this__u8e3s4, name) {
|
|
@@ -176,9 +176,9 @@
|
|
|
176
176
|
var predicate = byCardNamePredicate(name.slice());
|
|
177
177
|
// Inline function 'kotlin.collections.filterTo' call
|
|
178
178
|
var destination = ArrayList_init_$Create$();
|
|
179
|
-
var
|
|
180
|
-
while (
|
|
181
|
-
var element =
|
|
179
|
+
var _iterator__ex2g4s = _this__u8e3s4.j();
|
|
180
|
+
while (_iterator__ex2g4s.k()) {
|
|
181
|
+
var element = _iterator__ex2g4s.l();
|
|
182
182
|
if (predicate(element)) {
|
|
183
183
|
destination.e(element);
|
|
184
184
|
}
|
|
@@ -190,17 +190,16 @@
|
|
|
190
190
|
}
|
|
191
191
|
function byCardNamePredicate$lambda($types) {
|
|
192
192
|
return function (p1) {
|
|
193
|
+
var tmp0 = $types;
|
|
193
194
|
var tmp$ret$1;
|
|
194
195
|
$l$block: {
|
|
195
196
|
// Inline function 'kotlin.collections.any' call
|
|
196
|
-
var indexedObject = $types;
|
|
197
197
|
var inductionVariable = 0;
|
|
198
|
-
var last =
|
|
198
|
+
var last = tmp0.length;
|
|
199
199
|
while (inductionVariable < last) {
|
|
200
|
-
var element =
|
|
200
|
+
var element = tmp0[inductionVariable];
|
|
201
201
|
inductionVariable = inductionVariable + 1 | 0;
|
|
202
|
-
|
|
203
|
-
if (p1.s2().equals(element)) {
|
|
202
|
+
if (p1.p2().equals(element)) {
|
|
204
203
|
tmp$ret$1 = true;
|
|
205
204
|
break $l$block;
|
|
206
205
|
}
|
|
@@ -226,7 +225,7 @@
|
|
|
226
225
|
var CardName_HIDDEN_instance;
|
|
227
226
|
function getShortName($this) {
|
|
228
227
|
var tmp;
|
|
229
|
-
switch ($this.
|
|
228
|
+
switch ($this.o2_1) {
|
|
230
229
|
case 0:
|
|
231
230
|
tmp = 'A';
|
|
232
231
|
break;
|
|
@@ -297,25 +296,23 @@
|
|
|
297
296
|
}
|
|
298
297
|
function Companion() {
|
|
299
298
|
}
|
|
300
|
-
protoOf(Companion).
|
|
299
|
+
protoOf(Companion).s6b = function (suit, number) {
|
|
301
300
|
return new GameCard(getNumber(Companion_instance_0, getName(Companion_instance_0, number), suit));
|
|
302
301
|
};
|
|
303
|
-
protoOf(Companion).
|
|
302
|
+
protoOf(Companion).t6b = function (suit, cardNumber) {
|
|
304
303
|
return new GameCard(getNumber(Companion_instance_0, cardNumber, suit));
|
|
305
304
|
};
|
|
306
|
-
protoOf(Companion).
|
|
305
|
+
protoOf(Companion).u6b = function (index) {
|
|
307
306
|
return new GameCard(index);
|
|
308
307
|
};
|
|
309
|
-
protoOf(Companion).
|
|
308
|
+
protoOf(Companion).v6b = function (position, playerIndex, previousHiddenCardWithMaxIndex, reverse) {
|
|
310
309
|
var tmp;
|
|
311
310
|
if (previousHiddenCardWithMaxIndex == null) {
|
|
312
311
|
tmp = null;
|
|
313
312
|
} else {
|
|
314
313
|
// Inline function 'kotlin.takeIf' call
|
|
315
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
316
314
|
var tmp_0;
|
|
317
|
-
|
|
318
|
-
if (previousHiddenCardWithMaxIndex.a67()) {
|
|
315
|
+
if (previousHiddenCardWithMaxIndex.w6b()) {
|
|
319
316
|
tmp_0 = previousHiddenCardWithMaxIndex;
|
|
320
317
|
} else {
|
|
321
318
|
tmp_0 = null;
|
|
@@ -323,15 +320,13 @@
|
|
|
323
320
|
tmp = tmp_0;
|
|
324
321
|
}
|
|
325
322
|
var tmp3_safe_receiver = tmp;
|
|
326
|
-
var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.
|
|
327
|
-
var tmp5_safe_receiver = tmp4_safe_receiver == null ? null : Companion_instance_0.
|
|
323
|
+
var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.q6b_1;
|
|
324
|
+
var tmp5_safe_receiver = tmp4_safe_receiver == null ? null : Companion_instance_0.c6c(tmp4_safe_receiver, playerIndex, reverse);
|
|
328
325
|
var tmp_1;
|
|
329
326
|
if (tmp5_safe_receiver == null) {
|
|
330
327
|
tmp_1 = null;
|
|
331
328
|
} else {
|
|
332
329
|
// Inline function 'kotlin.let' call
|
|
333
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
334
|
-
// Inline function 'io.raspberryapps.card_game.core.data.models.cards.Companion.createUniqueHiddenCard.<anonymous>' call
|
|
335
330
|
tmp_1 = tmp5_safe_receiver + 1 | 0;
|
|
336
331
|
}
|
|
337
332
|
var tmp0_elvis_lhs = tmp_1;
|
|
@@ -345,10 +340,10 @@
|
|
|
345
340
|
var index = tmp_2;
|
|
346
341
|
return new GameCard(index);
|
|
347
342
|
};
|
|
348
|
-
protoOf(Companion).
|
|
343
|
+
protoOf(Companion).d6c = function (position, playerIndex, previousHiddenCardWithMaxIndex, reverse, $super) {
|
|
349
344
|
previousHiddenCardWithMaxIndex = previousHiddenCardWithMaxIndex === VOID ? null : previousHiddenCardWithMaxIndex;
|
|
350
345
|
reverse = reverse === VOID ? false : reverse;
|
|
351
|
-
return $super === VOID ? this.
|
|
346
|
+
return $super === VOID ? this.v6b(position, playerIndex, previousHiddenCardWithMaxIndex, reverse) : $super.v6b.call(this, position, playerIndex, previousHiddenCardWithMaxIndex, reverse);
|
|
352
347
|
};
|
|
353
348
|
var Companion_instance;
|
|
354
349
|
function Companion_getInstance() {
|
|
@@ -359,7 +354,7 @@
|
|
|
359
354
|
}
|
|
360
355
|
function getCardNumber($this, number) {
|
|
361
356
|
var tmp;
|
|
362
|
-
switch (number.
|
|
357
|
+
switch (number.o2_1) {
|
|
363
358
|
case 12:
|
|
364
359
|
tmp = 0;
|
|
365
360
|
break;
|
|
@@ -452,7 +447,7 @@
|
|
|
452
447
|
return tmp;
|
|
453
448
|
}
|
|
454
449
|
function _get_isShirt__vd98rp($this) {
|
|
455
|
-
return $this.
|
|
450
|
+
return $this.q6b_1 >= 150 && $this.q6b_1 <= 202;
|
|
456
451
|
}
|
|
457
452
|
function CardName(name, ordinal) {
|
|
458
453
|
Enum.call(this, name, ordinal);
|
|
@@ -461,13 +456,13 @@
|
|
|
461
456
|
return getShortName(this);
|
|
462
457
|
};
|
|
463
458
|
function Companion_0() {
|
|
464
|
-
this.
|
|
465
|
-
this.
|
|
466
|
-
this.
|
|
467
|
-
this.
|
|
468
|
-
this.
|
|
459
|
+
this.x6b_1 = -1;
|
|
460
|
+
this.y6b_1 = 13;
|
|
461
|
+
this.z6b_1 = 52;
|
|
462
|
+
this.a6c_1 = 150;
|
|
463
|
+
this.b6c_1 = 53;
|
|
469
464
|
}
|
|
470
|
-
protoOf(Companion_0).
|
|
465
|
+
protoOf(Companion_0).c6c = function (_this__u8e3s4, playerIndex, reverse) {
|
|
471
466
|
var tmp;
|
|
472
467
|
if (reverse) {
|
|
473
468
|
tmp = _this__u8e3s4 + (53 + imul(playerIndex, 14) | 0) | 0;
|
|
@@ -537,59 +532,59 @@
|
|
|
537
532
|
return CardName_HIDDEN_instance;
|
|
538
533
|
}
|
|
539
534
|
function GameCard(index) {
|
|
540
|
-
this.
|
|
535
|
+
this.q6b_1 = index;
|
|
541
536
|
}
|
|
542
|
-
protoOf(GameCard).
|
|
537
|
+
protoOf(GameCard).e6c = function () {
|
|
543
538
|
var tmp;
|
|
544
|
-
var containsArg = this.
|
|
539
|
+
var containsArg = this.q6b_1;
|
|
545
540
|
if (0 <= containsArg ? containsArg <= 13 : false) {
|
|
546
541
|
tmp = Suit_DIAMOND_getInstance();
|
|
547
542
|
} else {
|
|
548
|
-
if (this.
|
|
543
|
+
if (this.q6b_1 <= 26) {
|
|
549
544
|
tmp = Suit_SPADE_getInstance();
|
|
550
545
|
} else {
|
|
551
|
-
if (this.
|
|
546
|
+
if (this.q6b_1 <= 39) {
|
|
552
547
|
tmp = Suit_HEART_getInstance();
|
|
553
548
|
} else {
|
|
554
|
-
if (this.
|
|
549
|
+
if (this.q6b_1 <= 52) {
|
|
555
550
|
tmp = Suit_CLUB_getInstance();
|
|
556
551
|
} else {
|
|
557
|
-
throw IllegalStateException_init_$Create$('Invalid suitCard in Card.getValue() ' + this.
|
|
552
|
+
throw IllegalStateException_init_$Create$('Invalid suitCard in Card.getValue() ' + this.q6b_1);
|
|
558
553
|
}
|
|
559
554
|
}
|
|
560
555
|
}
|
|
561
556
|
}
|
|
562
557
|
return tmp;
|
|
563
558
|
};
|
|
564
|
-
protoOf(GameCard).
|
|
559
|
+
protoOf(GameCard).r6b = function () {
|
|
565
560
|
var tmp;
|
|
566
|
-
if (this.
|
|
561
|
+
if (this.w6b()) {
|
|
567
562
|
tmp = -1;
|
|
568
563
|
} else {
|
|
569
|
-
tmp = this.
|
|
564
|
+
tmp = this.q6b_1 - imul(13, getIndex(this.e6c())) | 0;
|
|
570
565
|
}
|
|
571
566
|
return tmp;
|
|
572
567
|
};
|
|
573
|
-
protoOf(GameCard).
|
|
574
|
-
return this.
|
|
568
|
+
protoOf(GameCard).p2 = function () {
|
|
569
|
+
return this.w6b() ? CardName_HIDDEN_getInstance() : getName(Companion_instance_0, this.r6b());
|
|
575
570
|
};
|
|
576
|
-
protoOf(GameCard).
|
|
577
|
-
return !_get_isShirt__vd98rp(this) && !this.
|
|
571
|
+
protoOf(GameCard).f6c = function () {
|
|
572
|
+
return !_get_isShirt__vd98rp(this) && !this.w6b();
|
|
578
573
|
};
|
|
579
|
-
protoOf(GameCard).
|
|
580
|
-
return this.
|
|
574
|
+
protoOf(GameCard).w6b = function () {
|
|
575
|
+
return this.q6b_1 >= 53 && this.q6b_1 <= 105;
|
|
581
576
|
};
|
|
582
577
|
protoOf(GameCard).toString = function () {
|
|
583
578
|
if (_get_isShirt__vd98rp(this)) {
|
|
584
|
-
return 'GameCard(SHIRT, ' + this.
|
|
579
|
+
return 'GameCard(SHIRT, ' + this.q6b_1 + ')';
|
|
585
580
|
}
|
|
586
|
-
if (this.
|
|
587
|
-
return 'GameCard(HIDDEN, ' + this.
|
|
581
|
+
if (this.w6b()) {
|
|
582
|
+
return 'GameCard(HIDDEN, ' + this.q6b_1 + ')';
|
|
588
583
|
}
|
|
589
|
-
return 'GameCard(' + this.
|
|
584
|
+
return 'GameCard(' + this.e6c().toString() + this.p2().toString() + ', ' + this.q6b_1 + ')';
|
|
590
585
|
};
|
|
591
586
|
protoOf(GameCard).hashCode = function () {
|
|
592
|
-
return this.
|
|
587
|
+
return this.q6b_1;
|
|
593
588
|
};
|
|
594
589
|
protoOf(GameCard).equals = function (other) {
|
|
595
590
|
if (this === other)
|
|
@@ -597,12 +592,12 @@
|
|
|
597
592
|
if (!(other instanceof GameCard))
|
|
598
593
|
return false;
|
|
599
594
|
var tmp0_other_with_cast = other instanceof GameCard ? other : THROW_CCE();
|
|
600
|
-
if (!(this.
|
|
595
|
+
if (!(this.q6b_1 === tmp0_other_with_cast.q6b_1))
|
|
601
596
|
return false;
|
|
602
597
|
return true;
|
|
603
598
|
};
|
|
604
599
|
function _get_$cachedSerializer__te6jhj($this) {
|
|
605
|
-
return $this.
|
|
600
|
+
return $this.g6c_1.u();
|
|
606
601
|
}
|
|
607
602
|
function Suit$Companion$_anonymous__cbm2iq() {
|
|
608
603
|
return createSimpleEnumSerializer('io.raspberryapps.card_game.core.data.models.cards.Suit', values());
|
|
@@ -613,7 +608,7 @@
|
|
|
613
608
|
var Suit_CLUB_instance;
|
|
614
609
|
function getSuitEmoji($this) {
|
|
615
610
|
var tmp;
|
|
616
|
-
switch ($this.
|
|
611
|
+
switch ($this.o2_1) {
|
|
617
612
|
case 0:
|
|
618
613
|
tmp = '\u2666\uFE0F';
|
|
619
614
|
break;
|
|
@@ -644,13 +639,13 @@
|
|
|
644
639
|
Companion_instance_1 = this;
|
|
645
640
|
var tmp = this;
|
|
646
641
|
var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
647
|
-
tmp.
|
|
642
|
+
tmp.g6c_1 = lazy(tmp_0, Suit$Companion$_anonymous__cbm2iq);
|
|
648
643
|
}
|
|
649
|
-
protoOf(Companion_1).
|
|
644
|
+
protoOf(Companion_1).w50 = function () {
|
|
650
645
|
return _get_$cachedSerializer__te6jhj(this);
|
|
651
646
|
};
|
|
652
|
-
protoOf(Companion_1).
|
|
653
|
-
return this.
|
|
647
|
+
protoOf(Companion_1).l4k = function (typeParamsSerializers) {
|
|
648
|
+
return this.w50();
|
|
654
649
|
};
|
|
655
650
|
var Companion_instance_1;
|
|
656
651
|
function Companion_getInstance_1() {
|
|
@@ -695,7 +690,7 @@
|
|
|
695
690
|
}
|
|
696
691
|
function getIndex(_this__u8e3s4) {
|
|
697
692
|
var tmp;
|
|
698
|
-
switch (_this__u8e3s4.
|
|
693
|
+
switch (_this__u8e3s4.o2_1) {
|
|
699
694
|
case 0:
|
|
700
695
|
tmp = 0;
|
|
701
696
|
break;
|
|
@@ -744,7 +739,7 @@
|
|
|
744
739
|
function CardsDealerProvider() {
|
|
745
740
|
}
|
|
746
741
|
function getRandomOrgCards($this, leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundsCount, userData, signed, $completion) {
|
|
747
|
-
var tmp = new $getRandomOrgCardsCOROUTINE$
|
|
742
|
+
var tmp = new $getRandomOrgCardsCOROUTINE$($this, leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundsCount, userData, signed, $completion);
|
|
748
743
|
tmp.l9_1 = Unit_instance;
|
|
749
744
|
tmp.m9_1 = null;
|
|
750
745
|
return tmp.r9();
|
|
@@ -754,10 +749,9 @@
|
|
|
754
749
|
// Inline function 'kotlin.collections.map' call
|
|
755
750
|
// Inline function 'kotlin.collections.mapTo' call
|
|
756
751
|
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(cards, 10));
|
|
757
|
-
var
|
|
758
|
-
while (
|
|
759
|
-
var item =
|
|
760
|
-
// Inline function 'io.raspberryapps.card_game.core.data.providers.cards.CardsDealerProviderImpl.normalizeCards.<anonymous>' call
|
|
752
|
+
var _iterator__ex2g4s = cards.j();
|
|
753
|
+
while (_iterator__ex2g4s.k()) {
|
|
754
|
+
var item = _iterator__ex2g4s.l();
|
|
761
755
|
var previousSuitNumber = item / oneSuitCount | 0;
|
|
762
756
|
var cardIndexShift = imul(leftCardIndexForEachSuit, previousSuitNumber + 1 | 0);
|
|
763
757
|
var newIndex = item + cardIndexShift | 0;
|
|
@@ -768,7 +762,7 @@
|
|
|
768
762
|
}
|
|
769
763
|
function Companion_2() {
|
|
770
764
|
}
|
|
771
|
-
protoOf(Companion_2).
|
|
765
|
+
protoOf(Companion_2).k6d = function (randomPoolProvider, logger) {
|
|
772
766
|
var tmp17_random = new SecureRandom(logger);
|
|
773
767
|
return new CardsDealerProviderImpl(tmp17_random, randomPoolProvider, logger);
|
|
774
768
|
};
|
|
@@ -776,16 +770,16 @@
|
|
|
776
770
|
function Companion_getInstance_2() {
|
|
777
771
|
return Companion_instance_2;
|
|
778
772
|
}
|
|
779
|
-
function $createNewShuffledCardDeckCOROUTINE$
|
|
773
|
+
function $createNewShuffledCardDeckCOROUTINE$(_this__u8e3s4, leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundCountForGame, userData, provider, resultContinuation) {
|
|
780
774
|
CoroutineImpl.call(this, resultContinuation);
|
|
781
|
-
this.
|
|
782
|
-
this.
|
|
783
|
-
this.
|
|
784
|
-
this.
|
|
785
|
-
this.
|
|
786
|
-
this.
|
|
787
|
-
}
|
|
788
|
-
protoOf($createNewShuffledCardDeckCOROUTINE$
|
|
775
|
+
this.t6d_1 = _this__u8e3s4;
|
|
776
|
+
this.u6d_1 = leftCardIndexForEachSuit;
|
|
777
|
+
this.v6d_1 = rightCardIndexForEachSuit;
|
|
778
|
+
this.w6d_1 = approximateRoundCountForGame;
|
|
779
|
+
this.x6d_1 = userData;
|
|
780
|
+
this.y6d_1 = provider;
|
|
781
|
+
}
|
|
782
|
+
protoOf($createNewShuffledCardDeckCOROUTINE$).r9 = function () {
|
|
789
783
|
var suspendResult = this.l9_1;
|
|
790
784
|
$sm: do
|
|
791
785
|
try {
|
|
@@ -793,26 +787,26 @@
|
|
|
793
787
|
switch (tmp) {
|
|
794
788
|
case 0:
|
|
795
789
|
this.k9_1 = 4;
|
|
796
|
-
this.
|
|
797
|
-
this.
|
|
798
|
-
if (this.
|
|
790
|
+
this.z6d_1 = this.y6d_1;
|
|
791
|
+
this.a6e_1 = this.z6d_1.o2_1;
|
|
792
|
+
if (this.a6e_1 === 0) {
|
|
799
793
|
var tmp_0 = this;
|
|
800
|
-
var it = this.
|
|
801
|
-
tmp_0.
|
|
794
|
+
var it = this.t6d_1.h6c(this.u6d_1, this.v6d_1);
|
|
795
|
+
tmp_0.b6e_1 = this.t6d_1.l6c(it);
|
|
802
796
|
this.j9_1 = 3;
|
|
803
797
|
continue $sm;
|
|
804
798
|
} else {
|
|
805
|
-
if (this.
|
|
799
|
+
if (this.a6e_1 === 1) {
|
|
806
800
|
this.j9_1 = 2;
|
|
807
|
-
suspendResult = getRandomOrgCards(this.
|
|
801
|
+
suspendResult = getRandomOrgCards(this.t6d_1, this.u6d_1, this.v6d_1, this.w6d_1, this.x6d_1, false, this);
|
|
808
802
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
809
803
|
return suspendResult;
|
|
810
804
|
}
|
|
811
805
|
continue $sm;
|
|
812
806
|
} else {
|
|
813
|
-
if (this.
|
|
807
|
+
if (this.a6e_1 === 2) {
|
|
814
808
|
this.j9_1 = 1;
|
|
815
|
-
suspendResult = getRandomOrgCards(this.
|
|
809
|
+
suspendResult = getRandomOrgCards(this.t6d_1, this.u6d_1, this.v6d_1, this.w6d_1, this.x6d_1, true, this);
|
|
816
810
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
817
811
|
return suspendResult;
|
|
818
812
|
}
|
|
@@ -826,15 +820,15 @@
|
|
|
826
820
|
|
|
827
821
|
break;
|
|
828
822
|
case 1:
|
|
829
|
-
this.
|
|
823
|
+
this.b6e_1 = suspendResult;
|
|
830
824
|
this.j9_1 = 3;
|
|
831
825
|
continue $sm;
|
|
832
826
|
case 2:
|
|
833
|
-
this.
|
|
827
|
+
this.b6e_1 = suspendResult;
|
|
834
828
|
this.j9_1 = 3;
|
|
835
829
|
continue $sm;
|
|
836
830
|
case 3:
|
|
837
|
-
return this.
|
|
831
|
+
return this.b6e_1;
|
|
838
832
|
case 4:
|
|
839
833
|
throw this.m9_1;
|
|
840
834
|
}
|
|
@@ -849,16 +843,16 @@
|
|
|
849
843
|
}
|
|
850
844
|
while (true);
|
|
851
845
|
};
|
|
852
|
-
function $getRandomOrgCardsCOROUTINE$
|
|
846
|
+
function $getRandomOrgCardsCOROUTINE$(_this__u8e3s4, leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundsCount, userData, signed, resultContinuation) {
|
|
853
847
|
CoroutineImpl.call(this, resultContinuation);
|
|
854
|
-
this.
|
|
855
|
-
this.
|
|
856
|
-
this.
|
|
857
|
-
this.
|
|
858
|
-
this.
|
|
859
|
-
this.
|
|
860
|
-
}
|
|
861
|
-
protoOf($getRandomOrgCardsCOROUTINE$
|
|
848
|
+
this.x6c_1 = _this__u8e3s4;
|
|
849
|
+
this.y6c_1 = leftCardIndexForEachSuit;
|
|
850
|
+
this.z6c_1 = rightCardIndexForEachSuit;
|
|
851
|
+
this.a6d_1 = approximateRoundsCount;
|
|
852
|
+
this.b6d_1 = userData;
|
|
853
|
+
this.c6d_1 = signed;
|
|
854
|
+
}
|
|
855
|
+
protoOf($getRandomOrgCardsCOROUTINE$).r9 = function () {
|
|
862
856
|
var suspendResult = this.l9_1;
|
|
863
857
|
$sm: do
|
|
864
858
|
try {
|
|
@@ -866,11 +860,11 @@
|
|
|
866
860
|
switch (tmp) {
|
|
867
861
|
case 0:
|
|
868
862
|
this.k9_1 = 5;
|
|
869
|
-
this.
|
|
870
|
-
this.
|
|
871
|
-
this.
|
|
863
|
+
this.d6d_1 = this.x6c_1.o6c(this.y6c_1, this.z6c_1);
|
|
864
|
+
this.e6d_1 = this.x6c_1.d6e_1;
|
|
865
|
+
this.f6d_1 = this.d6d_1 - 1 | 0;
|
|
872
866
|
this.j9_1 = 1;
|
|
873
|
-
suspendResult = this.
|
|
867
|
+
suspendResult = this.e6d_1.e5w(this.a6d_1, this.b6d_1, 0, this.f6d_1, this.d6d_1, this.c6d_1, VOID, this);
|
|
874
868
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
875
869
|
return suspendResult;
|
|
876
870
|
}
|
|
@@ -878,34 +872,34 @@
|
|
|
878
872
|
this.j9_1 = 2;
|
|
879
873
|
continue $sm;
|
|
880
874
|
case 1:
|
|
881
|
-
this.
|
|
882
|
-
suspendResult = new Result(this.
|
|
875
|
+
this.g6d_1 = suspendResult.cm_1;
|
|
876
|
+
suspendResult = new Result(this.g6d_1);
|
|
883
877
|
this.j9_1 = 2;
|
|
884
878
|
continue $sm;
|
|
885
879
|
case 2:
|
|
886
|
-
this.
|
|
887
|
-
if (_Result___get_isSuccess__impl__sndoy8(this.
|
|
880
|
+
this.h6d_1 = suspendResult.cm_1;
|
|
881
|
+
if (_Result___get_isSuccess__impl__sndoy8(this.h6d_1)) {
|
|
888
882
|
var tmp_0 = this;
|
|
889
|
-
var this_0 = this.
|
|
883
|
+
var this_0 = this.h6d_1;
|
|
890
884
|
throwOnFailure(this_0);
|
|
891
885
|
var tmp_1 = _Result___get_value__impl__bjfvqg(this_0);
|
|
892
886
|
var tmp14_cards = ((tmp_1 == null ? true : !(tmp_1 == null)) ? tmp_1 : THROW_CCE()).cards;
|
|
893
|
-
var this_1 = normalizeCards(this.
|
|
887
|
+
var this_1 = normalizeCards(this.x6c_1, tmp14_cards, this.y6c_1);
|
|
894
888
|
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_1, 10));
|
|
895
|
-
var
|
|
896
|
-
while (
|
|
897
|
-
var item =
|
|
898
|
-
destination.e(Companion_instance.
|
|
889
|
+
var _iterator__ex2g4s = this_1.j();
|
|
890
|
+
while (_iterator__ex2g4s.k()) {
|
|
891
|
+
var item = _iterator__ex2g4s.l();
|
|
892
|
+
destination.e(Companion_instance.u6b(item));
|
|
899
893
|
}
|
|
900
|
-
tmp_0.
|
|
894
|
+
tmp_0.i6d_1 = destination;
|
|
901
895
|
this.j9_1 = 4;
|
|
902
896
|
continue $sm;
|
|
903
897
|
} else {
|
|
904
|
-
this.
|
|
905
|
-
var tmp15_safe_receiver = this.
|
|
906
|
-
this.
|
|
898
|
+
this.j6d_1 = Result__exceptionOrNull_impl_p6xea9(this.h6d_1);
|
|
899
|
+
var tmp15_safe_receiver = this.j6d_1;
|
|
900
|
+
this.x6c_1.e6e_1.v('CardsDealerProvider', 'getRandomOrgCards: ' + (tmp15_safe_receiver == null ? null : tmp15_safe_receiver.message), this.j6d_1);
|
|
907
901
|
this.j9_1 = 3;
|
|
908
|
-
suspendResult = this.
|
|
902
|
+
suspendResult = this.x6c_1.i6c(this.y6c_1, this.z6c_1, this.a6d_1, this.b6d_1, CardsRandomProvider_CUSTOM_getInstance(), this);
|
|
909
903
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
910
904
|
return suspendResult;
|
|
911
905
|
}
|
|
@@ -913,11 +907,11 @@
|
|
|
913
907
|
}
|
|
914
908
|
|
|
915
909
|
case 3:
|
|
916
|
-
this.
|
|
910
|
+
this.i6d_1 = suspendResult;
|
|
917
911
|
this.j9_1 = 4;
|
|
918
912
|
continue $sm;
|
|
919
913
|
case 4:
|
|
920
|
-
return this.
|
|
914
|
+
return this.i6d_1;
|
|
921
915
|
case 5:
|
|
922
916
|
throw this.m9_1;
|
|
923
917
|
}
|
|
@@ -933,32 +927,30 @@
|
|
|
933
927
|
while (true);
|
|
934
928
|
};
|
|
935
929
|
function CardsDealerProviderImpl(random, randomPoolProvider, logger) {
|
|
936
|
-
this.
|
|
937
|
-
this.
|
|
938
|
-
this.
|
|
930
|
+
this.c6e_1 = random;
|
|
931
|
+
this.d6e_1 = randomPoolProvider;
|
|
932
|
+
this.e6e_1 = logger;
|
|
939
933
|
}
|
|
940
|
-
protoOf(CardsDealerProviderImpl).
|
|
934
|
+
protoOf(CardsDealerProviderImpl).h6c = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit) {
|
|
941
935
|
// Inline function 'kotlin.collections.flatMap' call
|
|
936
|
+
var tmp0 = get_entries();
|
|
942
937
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
943
|
-
var this_0 = get_entries();
|
|
944
938
|
var destination = ArrayList_init_$Create$();
|
|
945
|
-
var
|
|
946
|
-
while (
|
|
947
|
-
var element =
|
|
948
|
-
// Inline function 'io.raspberryapps.card_game.core.data.providers.cards.CardsDealerProviderImpl.createNewCardDeck.<anonymous>' call
|
|
939
|
+
var _iterator__ex2g4s = tmp0.j();
|
|
940
|
+
while (_iterator__ex2g4s.k()) {
|
|
941
|
+
var element = _iterator__ex2g4s.l();
|
|
949
942
|
// Inline function 'kotlin.collections.map' call
|
|
950
|
-
var
|
|
943
|
+
var this_0 = this.f6e(leftCardIndexForEachSuit, rightCardIndexForEachSuit);
|
|
951
944
|
// Inline function 'kotlin.collections.mapTo' call
|
|
952
|
-
var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(
|
|
953
|
-
var inductionVariable =
|
|
954
|
-
var last =
|
|
945
|
+
var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
946
|
+
var inductionVariable = this_0.a1_1;
|
|
947
|
+
var last = this_0.b1_1;
|
|
955
948
|
if (inductionVariable <= last)
|
|
956
949
|
do {
|
|
957
950
|
var item = inductionVariable;
|
|
958
951
|
inductionVariable = inductionVariable + 1 | 0;
|
|
959
|
-
// Inline function 'io.raspberryapps.card_game.core.data.providers.cards.CardsDealerProviderImpl.createNewCardDeck.<anonymous>.<anonymous>' call
|
|
960
952
|
var it = item;
|
|
961
|
-
var tmp$ret$0 = Companion_instance.
|
|
953
|
+
var tmp$ret$0 = Companion_instance.s6b(element, it);
|
|
962
954
|
destination_0.e(tmp$ret$0);
|
|
963
955
|
}
|
|
964
956
|
while (!(item === last));
|
|
@@ -967,41 +959,38 @@
|
|
|
967
959
|
}
|
|
968
960
|
return destination;
|
|
969
961
|
};
|
|
970
|
-
protoOf(CardsDealerProviderImpl).
|
|
962
|
+
protoOf(CardsDealerProviderImpl).f6e = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit) {
|
|
971
963
|
return until(leftCardIndexForEachSuit, 13 - rightCardIndexForEachSuit | 0);
|
|
972
964
|
};
|
|
973
|
-
protoOf(CardsDealerProviderImpl).
|
|
965
|
+
protoOf(CardsDealerProviderImpl).o6c = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit) {
|
|
974
966
|
// Inline function 'kotlin.collections.sumOf' call
|
|
975
967
|
var sum = 0;
|
|
976
|
-
var
|
|
977
|
-
while (
|
|
978
|
-
var element =
|
|
968
|
+
var _iterator__ex2g4s = get_entries().j();
|
|
969
|
+
while (_iterator__ex2g4s.k()) {
|
|
970
|
+
var element = _iterator__ex2g4s.l();
|
|
979
971
|
var tmp = sum;
|
|
980
|
-
|
|
981
|
-
sum = tmp + count(this.j69(leftCardIndexForEachSuit, rightCardIndexForEachSuit)) | 0;
|
|
972
|
+
sum = tmp + count(this.f6e(leftCardIndexForEachSuit, rightCardIndexForEachSuit)) | 0;
|
|
982
973
|
}
|
|
983
974
|
return sum;
|
|
984
975
|
};
|
|
985
|
-
protoOf(CardsDealerProviderImpl).
|
|
986
|
-
var tmp = new $createNewShuffledCardDeckCOROUTINE$
|
|
976
|
+
protoOf(CardsDealerProviderImpl).i6c = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundCountForGame, userData, provider, $completion) {
|
|
977
|
+
var tmp = new $createNewShuffledCardDeckCOROUTINE$(this, leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundCountForGame, userData, provider, $completion);
|
|
987
978
|
tmp.l9_1 = Unit_instance;
|
|
988
979
|
tmp.m9_1 = null;
|
|
989
980
|
return tmp.r9();
|
|
990
981
|
};
|
|
991
|
-
protoOf(CardsDealerProviderImpl).
|
|
992
|
-
// Inline function 'kotlin.apply' call
|
|
982
|
+
protoOf(CardsDealerProviderImpl).j6c = function (count, cards) {
|
|
993
983
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
984
|
+
// Inline function 'kotlin.apply' call
|
|
994
985
|
var this_0 = ArrayList_init_$Create$();
|
|
995
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
996
986
|
$l$block: {
|
|
997
|
-
// Inline function 'io.raspberryapps.card_game.core.data.providers.cards.CardsDealerProviderImpl.getNRandomUniqueCards.<anonymous>' call
|
|
998
987
|
var _iterator__ex2g4s = cards.j();
|
|
999
988
|
$l$loop_0: while (_iterator__ex2g4s.k()) {
|
|
1000
989
|
var card = _iterator__ex2g4s.l();
|
|
1001
990
|
if (this_0.m() === count) {
|
|
1002
991
|
break $l$block;
|
|
1003
992
|
}
|
|
1004
|
-
var hasSimilarCard = this_0.
|
|
993
|
+
var hasSimilarCard = this_0.s1(card);
|
|
1005
994
|
if (hasSimilarCard) {
|
|
1006
995
|
continue $l$loop_0;
|
|
1007
996
|
}
|
|
@@ -1018,11 +1007,10 @@
|
|
|
1018
1007
|
tmp$ret$2 = false;
|
|
1019
1008
|
break $l$block_1;
|
|
1020
1009
|
}
|
|
1021
|
-
var
|
|
1022
|
-
while (
|
|
1023
|
-
var element =
|
|
1024
|
-
|
|
1025
|
-
if (element.v66() === card.v66()) {
|
|
1010
|
+
var _iterator__ex2g4s_0 = this_0.j();
|
|
1011
|
+
while (_iterator__ex2g4s_0.k()) {
|
|
1012
|
+
var element = _iterator__ex2g4s_0.l();
|
|
1013
|
+
if (element.r6b() === card.r6b()) {
|
|
1026
1014
|
tmp$ret$2 = true;
|
|
1027
1015
|
break $l$block_1;
|
|
1028
1016
|
}
|
|
@@ -1037,85 +1025,80 @@
|
|
|
1037
1025
|
}
|
|
1038
1026
|
return this_0;
|
|
1039
1027
|
};
|
|
1040
|
-
protoOf(CardsDealerProviderImpl).
|
|
1028
|
+
protoOf(CardsDealerProviderImpl).k6c = function (cards, times) {
|
|
1041
1029
|
// Inline function 'kotlin.let' call
|
|
1042
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
1043
|
-
// Inline function 'io.raspberryapps.card_game.core.data.providers.cards.CardsDealerProviderImpl.standardShuffledCards.<anonymous>' call
|
|
1044
1030
|
var shuffled = toMutableList(cards);
|
|
1045
1031
|
var inductionVariable = 0;
|
|
1046
1032
|
if (inductionVariable < times)
|
|
1047
1033
|
do {
|
|
1048
1034
|
var i = inductionVariable;
|
|
1049
1035
|
inductionVariable = inductionVariable + 1 | 0;
|
|
1050
|
-
shuffled = this.
|
|
1036
|
+
shuffled = this.c6e_1.o61(shuffled);
|
|
1051
1037
|
}
|
|
1052
1038
|
while (inductionVariable < times);
|
|
1053
1039
|
return shuffled;
|
|
1054
1040
|
};
|
|
1055
|
-
protoOf(CardsDealerProviderImpl).
|
|
1056
|
-
return toList(overhand(riffle(toMutableList(cards), times, this.
|
|
1041
|
+
protoOf(CardsDealerProviderImpl).m6c = function (cards, times) {
|
|
1042
|
+
return toList(overhand(riffle(toMutableList(cards), times, this.c6e_1), times, this.c6e_1));
|
|
1057
1043
|
};
|
|
1058
1044
|
function Companion_3() {
|
|
1059
1045
|
}
|
|
1060
|
-
protoOf(Companion_3).
|
|
1061
|
-
// Inline function 'kotlin.apply' call
|
|
1046
|
+
protoOf(Companion_3).g6e = function () {
|
|
1062
1047
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
1048
|
+
// Inline function 'kotlin.apply' call
|
|
1063
1049
|
var this_0 = ArrayList_init_$Create$();
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
this_0.n(listOf([Companion_instance.
|
|
1067
|
-
this_0.n(listOf([Companion_instance.
|
|
1068
|
-
this_0.n(listOf([Companion_instance.
|
|
1069
|
-
this_0.n(listOf([Companion_instance.x66(Suit_SPADE_getInstance(), CardName_EIGHT_getInstance()), Companion_instance.x66(Suit_SPADE_getInstance(), CardName_TEN_getInstance()), Companion_instance.x66(Suit_HEART_getInstance(), CardName_TEN_getInstance()), Companion_instance.x66(Suit_SPADE_getInstance(), CardName_JACK_getInstance()), Companion_instance.x66(Suit_DIAMOND_getInstance(), CardName_EIGHT_getInstance()), Companion_instance.x66(Suit_SPADE_getInstance(), CardName_QUEEN_getInstance())]));
|
|
1070
|
-
this_0.n(listOf([Companion_instance.x66(Suit_DIAMOND_getInstance(), CardName_ACE_getInstance()), Companion_instance.x66(Suit_CLUB_getInstance(), CardName_EIGHT_getInstance()), Companion_instance.x66(Suit_DIAMOND_getInstance(), CardName_KING_getInstance()), Companion_instance.x66(Suit_SPADE_getInstance(), CardName_NINE_getInstance()), Companion_instance.x66(Suit_CLUB_getInstance(), CardName_ACE_getInstance()), Companion_instance.x66(Suit_SPADE_getInstance(), CardName_KING_getInstance()), Companion_instance.x66(Suit_DIAMOND_getInstance(), CardName_QUEEN_getInstance()), Companion_instance.x66(Suit_HEART_getInstance(), CardName_NINE_getInstance())]));
|
|
1050
|
+
this_0.n(listOf([Companion_instance.t6b(Suit_DIAMOND_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.t6b(Suit_CLUB_getInstance(), CardName_NINE_getInstance()), Companion_instance.t6b(Suit_CLUB_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.t6b(Suit_CLUB_getInstance(), CardName_TEN_getInstance()), Companion_instance.t6b(Suit_HEART_getInstance(), CardName_JACK_getInstance()), Companion_instance.t6b(Suit_HEART_getInstance(), CardName_KING_getInstance())]));
|
|
1051
|
+
this_0.n(listOf([Companion_instance.t6b(Suit_CLUB_getInstance(), CardName_JACK_getInstance()), Companion_instance.t6b(Suit_SPADE_getInstance(), CardName_ACE_getInstance()), Companion_instance.t6b(Suit_DIAMOND_getInstance(), CardName_NINE_getInstance()), Companion_instance.t6b(Suit_DIAMOND_getInstance(), CardName_TEN_getInstance()), Companion_instance.t6b(Suit_DIAMOND_getInstance(), CardName_JACK_getInstance()), Companion_instance.t6b(Suit_HEART_getInstance(), CardName_EIGHT_getInstance())]));
|
|
1052
|
+
this_0.n(listOf([Companion_instance.t6b(Suit_CLUB_getInstance(), CardName_QUEEN_getInstance()), Companion_instance.t6b(Suit_HEART_getInstance(), CardName_ACE_getInstance()), Companion_instance.t6b(Suit_HEART_getInstance(), CardName_QUEEN_getInstance()), Companion_instance.t6b(Suit_HEART_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.t6b(Suit_SPADE_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.t6b(Suit_CLUB_getInstance(), CardName_KING_getInstance())]));
|
|
1053
|
+
this_0.n(listOf([Companion_instance.t6b(Suit_SPADE_getInstance(), CardName_EIGHT_getInstance()), Companion_instance.t6b(Suit_SPADE_getInstance(), CardName_TEN_getInstance()), Companion_instance.t6b(Suit_HEART_getInstance(), CardName_TEN_getInstance()), Companion_instance.t6b(Suit_SPADE_getInstance(), CardName_JACK_getInstance()), Companion_instance.t6b(Suit_DIAMOND_getInstance(), CardName_EIGHT_getInstance()), Companion_instance.t6b(Suit_SPADE_getInstance(), CardName_QUEEN_getInstance())]));
|
|
1054
|
+
this_0.n(listOf([Companion_instance.t6b(Suit_DIAMOND_getInstance(), CardName_ACE_getInstance()), Companion_instance.t6b(Suit_CLUB_getInstance(), CardName_EIGHT_getInstance()), Companion_instance.t6b(Suit_DIAMOND_getInstance(), CardName_KING_getInstance()), Companion_instance.t6b(Suit_SPADE_getInstance(), CardName_NINE_getInstance()), Companion_instance.t6b(Suit_CLUB_getInstance(), CardName_ACE_getInstance()), Companion_instance.t6b(Suit_SPADE_getInstance(), CardName_KING_getInstance()), Companion_instance.t6b(Suit_DIAMOND_getInstance(), CardName_QUEEN_getInstance()), Companion_instance.t6b(Suit_HEART_getInstance(), CardName_NINE_getInstance())]));
|
|
1071
1055
|
return this_0;
|
|
1072
1056
|
};
|
|
1073
|
-
protoOf(Companion_3).
|
|
1074
|
-
return listOf([Companion_instance.
|
|
1057
|
+
protoOf(Companion_3).h6e = function () {
|
|
1058
|
+
return listOf([Companion_instance.t6b(Suit_CLUB_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.t6b(Suit_HEART_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.t6b(Suit_SPADE_getInstance(), CardName_SEVEN_getInstance()), Companion_instance.t6b(Suit_SPADE_getInstance(), CardName_EIGHT_getInstance())]);
|
|
1075
1059
|
};
|
|
1076
1060
|
var Companion_instance_3;
|
|
1077
1061
|
function Companion_getInstance_3() {
|
|
1078
1062
|
return Companion_instance_3;
|
|
1079
1063
|
}
|
|
1080
1064
|
function FakeCardsDealerProvider(cards, cardsForLot) {
|
|
1081
|
-
cards = cards === VOID ? Companion_instance_3.
|
|
1082
|
-
cardsForLot = cardsForLot === VOID ? Companion_instance_3.
|
|
1083
|
-
this.
|
|
1084
|
-
this.
|
|
1065
|
+
cards = cards === VOID ? Companion_instance_3.g6e() : cards;
|
|
1066
|
+
cardsForLot = cardsForLot === VOID ? Companion_instance_3.h6e() : cardsForLot;
|
|
1067
|
+
this.i6e_1 = cards;
|
|
1068
|
+
this.j6e_1 = cardsForLot;
|
|
1085
1069
|
}
|
|
1086
|
-
protoOf(FakeCardsDealerProvider).
|
|
1087
|
-
return this.
|
|
1070
|
+
protoOf(FakeCardsDealerProvider).h6c = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit) {
|
|
1071
|
+
return this.i6e_1;
|
|
1088
1072
|
};
|
|
1089
|
-
protoOf(FakeCardsDealerProvider).
|
|
1090
|
-
return this.
|
|
1073
|
+
protoOf(FakeCardsDealerProvider).i6c = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit, approximateRoundCountForGame, userData, provider, $completion) {
|
|
1074
|
+
return this.i6e_1;
|
|
1091
1075
|
};
|
|
1092
|
-
protoOf(FakeCardsDealerProvider).
|
|
1093
|
-
return this.
|
|
1076
|
+
protoOf(FakeCardsDealerProvider).j6c = function (count, cards) {
|
|
1077
|
+
return this.j6e_1;
|
|
1094
1078
|
};
|
|
1095
|
-
protoOf(FakeCardsDealerProvider).
|
|
1079
|
+
protoOf(FakeCardsDealerProvider).k6c = function (cards, times) {
|
|
1096
1080
|
return cards;
|
|
1097
1081
|
};
|
|
1098
|
-
protoOf(FakeCardsDealerProvider).
|
|
1082
|
+
protoOf(FakeCardsDealerProvider).m6c = function (cards, times) {
|
|
1099
1083
|
return cards;
|
|
1100
1084
|
};
|
|
1101
|
-
protoOf(FakeCardsDealerProvider).
|
|
1102
|
-
return this.
|
|
1085
|
+
protoOf(FakeCardsDealerProvider).o6c = function (leftCardIndexForEachSuit, rightCardIndexForEachSuit) {
|
|
1086
|
+
return this.i6e_1.m();
|
|
1103
1087
|
};
|
|
1104
1088
|
function CombinationsCheckerProvider() {
|
|
1105
1089
|
}
|
|
1106
1090
|
function createCombination($this, cards, supportedCombinations) {
|
|
1107
1091
|
var size = cards.m();
|
|
1108
|
-
if (supportedCombinations.
|
|
1092
|
+
if (supportedCombinations.s1(size)) {
|
|
1109
1093
|
return cards;
|
|
1110
1094
|
}
|
|
1111
1095
|
var fromLongestCombinations = asReversed(sorted(supportedCombinations));
|
|
1112
1096
|
var tmp$ret$1;
|
|
1113
1097
|
$l$block: {
|
|
1114
1098
|
// Inline function 'kotlin.collections.first' call
|
|
1115
|
-
var
|
|
1116
|
-
while (
|
|
1117
|
-
var element =
|
|
1118
|
-
// Inline function 'io.raspberryapps.card_game.core.data.providers.combinations.CombinationsCheckerProviderImpl.createCombination.<anonymous>' call
|
|
1099
|
+
var _iterator__ex2g4s = fromLongestCombinations.j();
|
|
1100
|
+
while (_iterator__ex2g4s.k()) {
|
|
1101
|
+
var element = _iterator__ex2g4s.l();
|
|
1119
1102
|
if (element <= size) {
|
|
1120
1103
|
tmp$ret$1 = element;
|
|
1121
1104
|
break $l$block;
|
|
@@ -1127,23 +1110,23 @@
|
|
|
1127
1110
|
return takeLast(cards, longestCombinationSupport);
|
|
1128
1111
|
}
|
|
1129
1112
|
function sam$kotlin_Comparator$0(function_0) {
|
|
1130
|
-
this.
|
|
1113
|
+
this.p6e_1 = function_0;
|
|
1131
1114
|
}
|
|
1132
|
-
protoOf(sam$kotlin_Comparator$0).
|
|
1133
|
-
return this.
|
|
1115
|
+
protoOf(sam$kotlin_Comparator$0).xc = function (a, b) {
|
|
1116
|
+
return this.p6e_1(a, b);
|
|
1134
1117
|
};
|
|
1135
1118
|
protoOf(sam$kotlin_Comparator$0).compare = function (a, b) {
|
|
1136
|
-
return this.
|
|
1119
|
+
return this.xc(a, b);
|
|
1137
1120
|
};
|
|
1138
|
-
protoOf(sam$kotlin_Comparator$0).
|
|
1139
|
-
return this.
|
|
1121
|
+
protoOf(sam$kotlin_Comparator$0).q3 = function () {
|
|
1122
|
+
return this.p6e_1;
|
|
1140
1123
|
};
|
|
1141
1124
|
protoOf(sam$kotlin_Comparator$0).equals = function (other) {
|
|
1142
1125
|
var tmp;
|
|
1143
1126
|
if (!(other == null) ? isInterface(other, Comparator) : false) {
|
|
1144
1127
|
var tmp_0;
|
|
1145
1128
|
if (!(other == null) ? isInterface(other, FunctionAdapter) : false) {
|
|
1146
|
-
tmp_0 = equals(this.
|
|
1129
|
+
tmp_0 = equals(this.q3(), other.q3());
|
|
1147
1130
|
} else {
|
|
1148
1131
|
tmp_0 = false;
|
|
1149
1132
|
}
|
|
@@ -1154,32 +1137,27 @@
|
|
|
1154
1137
|
return tmp;
|
|
1155
1138
|
};
|
|
1156
1139
|
protoOf(sam$kotlin_Comparator$0).hashCode = function () {
|
|
1157
|
-
return hashCode(this.
|
|
1140
|
+
return hashCode(this.q3());
|
|
1158
1141
|
};
|
|
1159
1142
|
function CombinationsCheckerProviderImpl$createCombinationsFromCardsInRow$lambda(a, b) {
|
|
1160
1143
|
// Inline function 'kotlin.comparisons.compareValuesBy' call
|
|
1161
|
-
|
|
1162
|
-
var tmp = first_0(
|
|
1163
|
-
// Inline function 'io.raspberryapps.card_game.core.data.providers.combinations.CombinationsCheckerProviderImpl.createCombinationsFromCardsInRow.<anonymous>' call
|
|
1164
|
-
var tmp$ret$1 = first_0(b).u66_1;
|
|
1144
|
+
var tmp = first_0(a).q6b_1;
|
|
1145
|
+
var tmp$ret$1 = first_0(b).q6b_1;
|
|
1165
1146
|
return compareValues(tmp, tmp$ret$1);
|
|
1166
1147
|
}
|
|
1167
1148
|
function CombinationsCheckerProviderImpl() {
|
|
1168
1149
|
}
|
|
1169
|
-
protoOf(CombinationsCheckerProviderImpl).
|
|
1170
|
-
// Inline function 'kotlin.collections.filter' call
|
|
1150
|
+
protoOf(CombinationsCheckerProviderImpl).k6e = function (cards, supportedCombinations, checkFromIndex, includeCardNames, suit) {
|
|
1171
1151
|
// Inline function 'kotlin.apply' call
|
|
1172
1152
|
var this_0 = toMutableList(cards);
|
|
1173
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
1174
|
-
// Inline function 'io.raspberryapps.card_game.core.data.providers.combinations.CombinationsCheckerProviderImpl.findCardsInRowCombinations.<anonymous>' call
|
|
1175
1153
|
sortWith(this_0, CardIndexComparator_instance);
|
|
1154
|
+
// Inline function 'kotlin.collections.filter' call
|
|
1176
1155
|
// Inline function 'kotlin.collections.filterTo' call
|
|
1177
1156
|
var destination = ArrayList_init_$Create$();
|
|
1178
|
-
var
|
|
1179
|
-
while (
|
|
1180
|
-
var element =
|
|
1181
|
-
|
|
1182
|
-
if (element.j67()) {
|
|
1157
|
+
var _iterator__ex2g4s = this_0.j();
|
|
1158
|
+
while (_iterator__ex2g4s.k()) {
|
|
1159
|
+
var element = _iterator__ex2g4s.l();
|
|
1160
|
+
if (element.f6c()) {
|
|
1183
1161
|
destination.e(element);
|
|
1184
1162
|
}
|
|
1185
1163
|
}
|
|
@@ -1196,16 +1174,16 @@
|
|
|
1196
1174
|
inductionVariable = inductionVariable + 1 | 0;
|
|
1197
1175
|
var previousCard = lastOrNull(combinationCards);
|
|
1198
1176
|
var currentCard = sortedByIndexCards.o(i);
|
|
1199
|
-
var isNextInRow = !(previousCard == null) && currentCard.
|
|
1200
|
-
var passedCardNamesCheck = includeCardNames == null || includeCardNames.
|
|
1201
|
-
var passedSuitCheck = suit == null || currentCard.
|
|
1177
|
+
var isNextInRow = !(previousCard == null) && currentCard.q6b_1 === (previousCard.q6b_1 + 1 | 0) && currentCard.e6c().equals(previousCard.e6c());
|
|
1178
|
+
var passedCardNamesCheck = includeCardNames == null || includeCardNames.s1(currentCard.p2());
|
|
1179
|
+
var passedSuitCheck = suit == null || currentCard.e6c().equals(suit);
|
|
1202
1180
|
if (isNextInRow && passedSuitCheck && passedCardNamesCheck) {
|
|
1203
1181
|
combinationCards.e(currentCard);
|
|
1204
1182
|
} else {
|
|
1205
1183
|
if (combinationCards.m() > (checkFromIndex - 1 | 0)) {
|
|
1206
|
-
combinations.n(this.
|
|
1184
|
+
combinations.n(this.o6e(toMutableList(combinationCards), supportedCombinations));
|
|
1207
1185
|
}
|
|
1208
|
-
combinationCards.
|
|
1186
|
+
combinationCards.a2();
|
|
1209
1187
|
if (passedSuitCheck && passedCardNamesCheck) {
|
|
1210
1188
|
combinationCards.e(currentCard);
|
|
1211
1189
|
}
|
|
@@ -1213,55 +1191,48 @@
|
|
|
1213
1191
|
}
|
|
1214
1192
|
while (inductionVariable <= last);
|
|
1215
1193
|
if (combinationCards.m() > (checkFromIndex - 1 | 0)) {
|
|
1216
|
-
combinations.n(this.
|
|
1194
|
+
combinations.n(this.o6e(toMutableList(combinationCards), supportedCombinations));
|
|
1217
1195
|
}
|
|
1218
1196
|
return combinations;
|
|
1219
1197
|
};
|
|
1220
|
-
protoOf(CombinationsCheckerProviderImpl).
|
|
1221
|
-
// Inline function 'kotlin.collections.filter' call
|
|
1222
|
-
// Inline function 'kotlin.collections.filter' call
|
|
1198
|
+
protoOf(CombinationsCheckerProviderImpl).m6e = function (cards, cardsCount, includeCardNames) {
|
|
1223
1199
|
// Inline function 'kotlin.apply' call
|
|
1224
1200
|
var this_0 = toMutableList(cards);
|
|
1225
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
1226
|
-
// Inline function 'io.raspberryapps.card_game.core.data.providers.combinations.CombinationsCheckerProviderImpl.findSameCardsNumberCombinations.<anonymous>' call
|
|
1227
1201
|
sortWith(this_0, CardIndexComparator_instance);
|
|
1202
|
+
// Inline function 'kotlin.collections.filter' call
|
|
1228
1203
|
// Inline function 'kotlin.collections.filterTo' call
|
|
1229
1204
|
var destination = ArrayList_init_$Create$();
|
|
1230
|
-
var
|
|
1231
|
-
while (
|
|
1232
|
-
var element =
|
|
1233
|
-
|
|
1234
|
-
if (element.j67()) {
|
|
1205
|
+
var _iterator__ex2g4s = this_0.j();
|
|
1206
|
+
while (_iterator__ex2g4s.k()) {
|
|
1207
|
+
var element = _iterator__ex2g4s.l();
|
|
1208
|
+
if (element.f6c()) {
|
|
1235
1209
|
destination.e(element);
|
|
1236
1210
|
}
|
|
1237
1211
|
}
|
|
1212
|
+
// Inline function 'kotlin.collections.filter' call
|
|
1238
1213
|
// Inline function 'kotlin.collections.filterTo' call
|
|
1239
1214
|
var destination_0 = ArrayList_init_$Create$();
|
|
1240
|
-
var
|
|
1241
|
-
while (
|
|
1242
|
-
var element_0 =
|
|
1243
|
-
|
|
1244
|
-
if (includeCardNames == null || includeCardNames.v1(element_0.s2())) {
|
|
1215
|
+
var _iterator__ex2g4s_0 = destination.j();
|
|
1216
|
+
while (_iterator__ex2g4s_0.k()) {
|
|
1217
|
+
var element_0 = _iterator__ex2g4s_0.l();
|
|
1218
|
+
if (includeCardNames == null || includeCardNames.s1(element_0.p2())) {
|
|
1245
1219
|
destination_0.e(element_0);
|
|
1246
1220
|
}
|
|
1247
1221
|
}
|
|
1248
1222
|
var sortedByNumberCards = toList(destination_0);
|
|
1249
|
-
// Inline function 'kotlin.collections.filter' call
|
|
1250
1223
|
// Inline function 'kotlin.collections.groupBy' call
|
|
1251
1224
|
// Inline function 'kotlin.collections.groupByTo' call
|
|
1252
1225
|
var destination_1 = LinkedHashMap_init_$Create$();
|
|
1253
|
-
var
|
|
1254
|
-
while (
|
|
1255
|
-
var element_1 =
|
|
1256
|
-
|
|
1257
|
-
var key = element_1.v66();
|
|
1226
|
+
var _iterator__ex2g4s_1 = sortedByNumberCards.j();
|
|
1227
|
+
while (_iterator__ex2g4s_1.k()) {
|
|
1228
|
+
var element_1 = _iterator__ex2g4s_1.l();
|
|
1229
|
+
var key = element_1.r6b();
|
|
1258
1230
|
// Inline function 'kotlin.collections.getOrPut' call
|
|
1259
|
-
var value = destination_1.
|
|
1231
|
+
var value = destination_1.h2(key);
|
|
1260
1232
|
var tmp;
|
|
1261
1233
|
if (value == null) {
|
|
1262
|
-
// Inline function 'kotlin.collections.groupByTo.<anonymous>' call
|
|
1263
1234
|
var answer = ArrayList_init_$Create$();
|
|
1264
|
-
destination_1.
|
|
1235
|
+
destination_1.k2(key, answer);
|
|
1265
1236
|
tmp = answer;
|
|
1266
1237
|
} else {
|
|
1267
1238
|
tmp = value;
|
|
@@ -1269,39 +1240,36 @@
|
|
|
1269
1240
|
var list = tmp;
|
|
1270
1241
|
list.e(element_1);
|
|
1271
1242
|
}
|
|
1243
|
+
// Inline function 'kotlin.collections.filter' call
|
|
1272
1244
|
// Inline function 'kotlin.collections.filterTo' call
|
|
1273
1245
|
var destination_2 = LinkedHashMap_init_$Create$();
|
|
1274
1246
|
// Inline function 'kotlin.collections.iterator' call
|
|
1275
|
-
var
|
|
1276
|
-
while (
|
|
1277
|
-
var element_2 =
|
|
1278
|
-
// Inline function 'io.raspberryapps.card_game.core.data.providers.combinations.CombinationsCheckerProviderImpl.findSameCardsNumberCombinations.<anonymous>' call
|
|
1247
|
+
var _iterator__ex2g4s_2 = destination_1.s().j();
|
|
1248
|
+
while (_iterator__ex2g4s_2.k()) {
|
|
1249
|
+
var element_2 = _iterator__ex2g4s_2.l();
|
|
1279
1250
|
if (element_2.u().m() >= cardsCount) {
|
|
1280
|
-
destination_2.
|
|
1251
|
+
destination_2.k2(element_2.t(), element_2.u());
|
|
1281
1252
|
}
|
|
1282
1253
|
}
|
|
1283
|
-
var combinations = destination_2.
|
|
1254
|
+
var combinations = destination_2.j2();
|
|
1284
1255
|
// Inline function 'kotlin.collections.map' call
|
|
1285
1256
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1286
1257
|
var destination_3 = ArrayList_init_$Create$_0(collectionSizeOrDefault(combinations, 10));
|
|
1287
|
-
var
|
|
1288
|
-
while (
|
|
1289
|
-
var item =
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
destination_3.e(tmp$ret$16);
|
|
1258
|
+
var _iterator__ex2g4s_3 = combinations.j();
|
|
1259
|
+
while (_iterator__ex2g4s_3.k()) {
|
|
1260
|
+
var item = _iterator__ex2g4s_3.l();
|
|
1261
|
+
var tmp$ret$17 = sortedWith(item, CardIndexComparator_instance);
|
|
1262
|
+
destination_3.e(tmp$ret$17);
|
|
1293
1263
|
}
|
|
1294
1264
|
return destination_3;
|
|
1295
1265
|
};
|
|
1296
|
-
protoOf(CombinationsCheckerProviderImpl).
|
|
1266
|
+
protoOf(CombinationsCheckerProviderImpl).o6e = function (cards, supportedCombinations) {
|
|
1297
1267
|
// Inline function 'kotlin.collections.minOf' call
|
|
1298
1268
|
var iterator = supportedCombinations.j();
|
|
1299
1269
|
if (!iterator.k())
|
|
1300
1270
|
throw NoSuchElementException_init_$Create$_0();
|
|
1301
|
-
// Inline function 'io.raspberryapps.card_game.core.data.providers.combinations.CombinationsCheckerProviderImpl.createCombinationsFromCardsInRow.<anonymous>' call
|
|
1302
1271
|
var minValue = iterator.l();
|
|
1303
1272
|
while (iterator.k()) {
|
|
1304
|
-
// Inline function 'io.raspberryapps.card_game.core.data.providers.combinations.CombinationsCheckerProviderImpl.createCombinationsFromCardsInRow.<anonymous>' call
|
|
1305
1273
|
var v = iterator.l();
|
|
1306
1274
|
if (compareTo(minValue, v) > 0) {
|
|
1307
1275
|
minValue = v;
|
|
@@ -1314,7 +1282,7 @@
|
|
|
1314
1282
|
while (cardsToCheck.m() >= shortestCombinationSupport) {
|
|
1315
1283
|
var combinationCards = createCombination(this, cardsToCheck, supportedCombinations);
|
|
1316
1284
|
combinations.e(toList(combinationCards));
|
|
1317
|
-
cardsToCheck.
|
|
1285
|
+
cardsToCheck.z1(combinationCards);
|
|
1318
1286
|
}
|
|
1319
1287
|
// Inline function 'kotlin.collections.sortedBy' call
|
|
1320
1288
|
// Inline function 'kotlin.comparisons.compareBy' call
|
|
@@ -1322,38 +1290,39 @@
|
|
|
1322
1290
|
var tmp$ret$4 = new sam$kotlin_Comparator$0(tmp);
|
|
1323
1291
|
return sortedWith(combinations, tmp$ret$4);
|
|
1324
1292
|
};
|
|
1293
|
+
function DealerReducer() {
|
|
1294
|
+
}
|
|
1325
1295
|
function DealerReducerImpl(logger, enableLogs) {
|
|
1326
|
-
this.
|
|
1327
|
-
this.
|
|
1296
|
+
this.t6e_1 = logger;
|
|
1297
|
+
this.u6e_1 = enableLogs;
|
|
1328
1298
|
}
|
|
1329
|
-
protoOf(DealerReducerImpl).
|
|
1299
|
+
protoOf(DealerReducerImpl).q6e = function (cards, cardsToRemove) {
|
|
1330
1300
|
var list = cards;
|
|
1331
1301
|
var _iterator__ex2g4s = cardsToRemove.j();
|
|
1332
1302
|
while (_iterator__ex2g4s.k()) {
|
|
1333
1303
|
var gameCard = _iterator__ex2g4s.l();
|
|
1334
|
-
list = this.
|
|
1304
|
+
list = this.r6e(list, gameCard);
|
|
1335
1305
|
}
|
|
1336
1306
|
return list;
|
|
1337
1307
|
};
|
|
1338
|
-
protoOf(DealerReducerImpl).
|
|
1308
|
+
protoOf(DealerReducerImpl).r6e = function (cards, cardToRemove) {
|
|
1339
1309
|
var tmp;
|
|
1340
|
-
if (!cardToRemove.
|
|
1341
|
-
if (this.
|
|
1342
|
-
this.
|
|
1310
|
+
if (!cardToRemove.w6b() && cards.s1(cardToRemove)) {
|
|
1311
|
+
if (this.u6e_1) {
|
|
1312
|
+
this.t6e_1.d('Dealer', 'Card removed: ' + cardToRemove.toString() + ', size: ' + (cards.m() - 1 | 0));
|
|
1343
1313
|
}
|
|
1344
1314
|
tmp = minus(cards, cardToRemove);
|
|
1345
1315
|
} else {
|
|
1346
|
-
if (this.
|
|
1347
|
-
this.
|
|
1316
|
+
if (this.u6e_1) {
|
|
1317
|
+
this.t6e_1.d('Dealer', 'Card removed as hidden: ' + cardToRemove.toString() + ', size: ' + (cards.m() - 1 | 0));
|
|
1348
1318
|
}
|
|
1349
1319
|
// Inline function 'kotlin.collections.filterNot' call
|
|
1350
1320
|
// Inline function 'kotlin.collections.filterNotTo' call
|
|
1351
1321
|
var destination = ArrayList_init_$Create$();
|
|
1352
|
-
var
|
|
1353
|
-
while (
|
|
1354
|
-
var element =
|
|
1355
|
-
|
|
1356
|
-
if (!element.a67()) {
|
|
1322
|
+
var _iterator__ex2g4s = cards.j();
|
|
1323
|
+
while (_iterator__ex2g4s.k()) {
|
|
1324
|
+
var element = _iterator__ex2g4s.l();
|
|
1325
|
+
if (!element.w6b()) {
|
|
1357
1326
|
destination.e(element);
|
|
1358
1327
|
}
|
|
1359
1328
|
}
|
|
@@ -1361,40 +1330,37 @@
|
|
|
1361
1330
|
// Inline function 'kotlin.collections.filter' call
|
|
1362
1331
|
// Inline function 'kotlin.collections.filterTo' call
|
|
1363
1332
|
var destination_0 = ArrayList_init_$Create$();
|
|
1364
|
-
var
|
|
1365
|
-
while (
|
|
1366
|
-
var element_0 =
|
|
1367
|
-
|
|
1368
|
-
if (element_0.a67()) {
|
|
1333
|
+
var _iterator__ex2g4s_0 = cards.j();
|
|
1334
|
+
while (_iterator__ex2g4s_0.k()) {
|
|
1335
|
+
var element_0 = _iterator__ex2g4s_0.l();
|
|
1336
|
+
if (element_0.w6b()) {
|
|
1369
1337
|
destination_0.e(element_0);
|
|
1370
1338
|
}
|
|
1371
1339
|
}
|
|
1372
1340
|
var hiddenCards = destination_0;
|
|
1373
1341
|
if (hiddenCards.p()) {
|
|
1374
|
-
this.
|
|
1342
|
+
this.t6e_1.w('Dealer', "Can't find card to delete for player, " + ('cards:' + toString(cards) + ', ') + ('cardToRemove: ' + cardToRemove.toString()));
|
|
1375
1343
|
}
|
|
1376
1344
|
tmp = plus(notHiddenCards, dropLast(hiddenCards, 1));
|
|
1377
1345
|
}
|
|
1378
1346
|
return tmp;
|
|
1379
1347
|
};
|
|
1380
|
-
protoOf(DealerReducerImpl).
|
|
1381
|
-
if (this.
|
|
1382
|
-
this.
|
|
1348
|
+
protoOf(DealerReducerImpl).s6e = function (cards, cardToAdd) {
|
|
1349
|
+
if (this.u6e_1) {
|
|
1350
|
+
this.t6e_1.d('Dealer', 'Card added: ' + cardToAdd.toString() + ', size: ' + (cards.m() + 1 | 0));
|
|
1383
1351
|
}
|
|
1384
|
-
if (cards.
|
|
1385
|
-
this.
|
|
1352
|
+
if (cards.s1(cardToAdd)) {
|
|
1353
|
+
this.t6e_1.w('Dealer', 'Card already exists for player, ' + ('cards:' + toString(cards) + ', ') + ('cardToAdd: ' + cardToAdd.toString()));
|
|
1386
1354
|
}
|
|
1387
1355
|
return plus_0(cards, cardToAdd);
|
|
1388
1356
|
};
|
|
1389
|
-
function DealerReducer() {
|
|
1390
|
-
}
|
|
1391
1357
|
//region block: post-declaration
|
|
1392
|
-
protoOf(CardsDealerProviderImpl).
|
|
1393
|
-
protoOf(CardsDealerProviderImpl).
|
|
1394
|
-
protoOf(FakeCardsDealerProvider).
|
|
1395
|
-
protoOf(FakeCardsDealerProvider).
|
|
1396
|
-
protoOf(CombinationsCheckerProviderImpl).
|
|
1397
|
-
protoOf(CombinationsCheckerProviderImpl).
|
|
1358
|
+
protoOf(CardsDealerProviderImpl).l6c = standardShuffledCards$default;
|
|
1359
|
+
protoOf(CardsDealerProviderImpl).n6c = realLifeShuffledCards$default;
|
|
1360
|
+
protoOf(FakeCardsDealerProvider).l6c = standardShuffledCards$default;
|
|
1361
|
+
protoOf(FakeCardsDealerProvider).n6c = realLifeShuffledCards$default;
|
|
1362
|
+
protoOf(CombinationsCheckerProviderImpl).l6e = findCardsInRowCombinations$default;
|
|
1363
|
+
protoOf(CombinationsCheckerProviderImpl).n6e = findSameCardsNumberCombinations$default;
|
|
1398
1364
|
//endregion
|
|
1399
1365
|
//region block: init
|
|
1400
1366
|
CoreConfig_instance = new CoreConfig();
|