game_client_logic_deb 1.8.76 → 1.8.104
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 +98 -99
- package/Kosi-Kaverit-kaverit.js.map +1 -1
- package/Kosi-Kodein-kodein-di.js +803 -804
- package/Kosi-Kodein-kodein-di.js.map +1 -1
- package/Kotlin-DateTime-library-kotlinx-datetime.js +171 -202
- package/Kotlin-DateTime-library-kotlinx-datetime.js.map +1 -1
- package/Logic_Debertz-core.js +2001 -2391
- package/Logic_Debertz-core.js.map +1 -1
- package/Logic_Debertz-engine.js +17860 -20682
- package/Logic_Debertz-engine.js.map +1 -1
- package/Logic_Debertz-game_client.d.ts +181 -141
- package/Logic_Debertz-game_client.js +5318 -5798
- package/Logic_Debertz-game_client.js.map +1 -1
- package/kotlin-kotlin-stdlib.js +8588 -7787
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kotlin-kotlinx-atomicfu-runtime.js +1 -1
- package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js +1 -1
- package/kotlinx-atomicfu.js +54 -39
- package/kotlinx-atomicfu.js.map +1 -1
- package/kotlinx-coroutines-core.js +2899 -2964
- package/kotlinx-coroutines-core.js.map +1 -1
- package/kotlinx-io-kotlinx-io-bytestring.js +1 -1
- package/kotlinx-io-kotlinx-io-core.js +326 -358
- package/kotlinx-io-kotlinx-io-core.js.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-core.js +2416 -2452
- package/kotlinx-serialization-kotlinx-serialization-core.js.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-json.js +1699 -1842
- package/kotlinx-serialization-kotlinx-serialization-json.js.map +1 -1
- package/package.json +1 -1
- package/raspberry-cardgame-lib-core.js +300 -297
- package/raspberry-cardgame-lib-core.js.map +1 -1
- package/secure-random-secure-random.js +1 -1
- package/uuid.js +44 -59
- package/uuid.js.map +1 -1
|
@@ -12,109 +12,112 @@
|
|
|
12
12
|
}
|
|
13
13
|
root['raspberry-cardgame-lib-core'] = factory(typeof this['raspberry-cardgame-lib-core'] === 'undefined' ? {} : this['raspberry-cardgame-lib-core'], this['kotlin-kotlin-stdlib'], this['kotlinx-serialization-kotlinx-serialization-core']);
|
|
14
14
|
}
|
|
15
|
-
}(
|
|
15
|
+
}(globalThis, function (_, kotlin_kotlin, kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core) {
|
|
16
16
|
'use strict';
|
|
17
17
|
//region block: imports
|
|
18
18
|
var imul = Math.imul;
|
|
19
|
-
var protoOf = kotlin_kotlin.$_$.
|
|
20
|
-
var
|
|
21
|
-
var
|
|
22
|
-
var defineProp = kotlin_kotlin.$_$.y9;
|
|
19
|
+
var protoOf = kotlin_kotlin.$_$.gb;
|
|
20
|
+
var initMetadataForObject = kotlin_kotlin.$_$.oa;
|
|
21
|
+
var defineProp = kotlin_kotlin.$_$.ba;
|
|
23
22
|
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.m;
|
|
24
|
-
var Unit_instance = kotlin_kotlin.$_$.
|
|
25
|
-
var THROW_CCE = kotlin_kotlin.$_$.
|
|
26
|
-
var Comparator = kotlin_kotlin.$_$.
|
|
23
|
+
var Unit_instance = kotlin_kotlin.$_$.z4;
|
|
24
|
+
var THROW_CCE = kotlin_kotlin.$_$.ee;
|
|
25
|
+
var Comparator = kotlin_kotlin.$_$.qd;
|
|
27
26
|
var VOID = kotlin_kotlin.$_$.f;
|
|
28
|
-
var take = kotlin_kotlin.$_$.
|
|
29
|
-
var toList = kotlin_kotlin.$_$.
|
|
30
|
-
var takeLast = kotlin_kotlin.$_$.
|
|
31
|
-
var noWhenBranchMatchedException = kotlin_kotlin.$_$.
|
|
27
|
+
var take = kotlin_kotlin.$_$.l8;
|
|
28
|
+
var toList = kotlin_kotlin.$_$.o8;
|
|
29
|
+
var takeLast = kotlin_kotlin.$_$.k8;
|
|
30
|
+
var noWhenBranchMatchedException = kotlin_kotlin.$_$.bf;
|
|
31
|
+
var initMetadataForCompanion = kotlin_kotlin.$_$.ka;
|
|
32
32
|
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.q1;
|
|
33
|
-
var Enum = kotlin_kotlin.$_$.
|
|
34
|
-
var
|
|
35
|
-
var createSimpleEnumSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.
|
|
33
|
+
var Enum = kotlin_kotlin.$_$.td;
|
|
34
|
+
var initMetadataForClass = kotlin_kotlin.$_$.ja;
|
|
35
|
+
var createSimpleEnumSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.b2;
|
|
36
36
|
var LazyThreadSafetyMode_PUBLICATION_getInstance = kotlin_kotlin.$_$.j;
|
|
37
|
-
var lazy = kotlin_kotlin.$_$.
|
|
38
|
-
var SerializerFactory = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.
|
|
39
|
-
var enumEntries = kotlin_kotlin.$_$.
|
|
40
|
-
var
|
|
41
|
-
var first = kotlin_kotlin.$_$.
|
|
42
|
-
var sorted = kotlin_kotlin.$_$.
|
|
43
|
-
var asReversed = kotlin_kotlin.$_$.
|
|
37
|
+
var lazy = kotlin_kotlin.$_$.ze;
|
|
38
|
+
var SerializerFactory = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.z1;
|
|
39
|
+
var enumEntries = kotlin_kotlin.$_$.q9;
|
|
40
|
+
var initMetadataForInterface = kotlin_kotlin.$_$.ma;
|
|
41
|
+
var first = kotlin_kotlin.$_$.w6;
|
|
42
|
+
var sorted = kotlin_kotlin.$_$.i8;
|
|
43
|
+
var asReversed = kotlin_kotlin.$_$.t5;
|
|
44
44
|
var NoSuchElementException_init_$Create$ = kotlin_kotlin.$_$.v1;
|
|
45
|
-
var sortedWith = kotlin_kotlin.$_$.
|
|
46
|
-
var lastOrNull = kotlin_kotlin.$_$.
|
|
47
|
-
var toMutableList = kotlin_kotlin.$_$.
|
|
45
|
+
var sortedWith = kotlin_kotlin.$_$.h8;
|
|
46
|
+
var lastOrNull = kotlin_kotlin.$_$.k7;
|
|
47
|
+
var toMutableList = kotlin_kotlin.$_$.r8;
|
|
48
48
|
var NoSuchElementException_init_$Create$_0 = kotlin_kotlin.$_$.t1;
|
|
49
|
-
var compareTo = kotlin_kotlin.$_$.
|
|
50
|
-
var
|
|
51
|
-
var
|
|
52
|
-
var
|
|
53
|
-
var
|
|
54
|
-
var
|
|
55
|
-
var
|
|
56
|
-
var
|
|
57
|
-
var
|
|
49
|
+
var compareTo = kotlin_kotlin.$_$.aa;
|
|
50
|
+
var toString = kotlin_kotlin.$_$.kb;
|
|
51
|
+
var dropLast = kotlin_kotlin.$_$.o6;
|
|
52
|
+
var plus = kotlin_kotlin.$_$.z7;
|
|
53
|
+
var minus = kotlin_kotlin.$_$.u7;
|
|
54
|
+
var plus_0 = kotlin_kotlin.$_$.a8;
|
|
55
|
+
var mutableListOf = kotlin_kotlin.$_$.v7;
|
|
56
|
+
var printStackTrace = kotlin_kotlin.$_$.df;
|
|
57
|
+
var isBlank = kotlin_kotlin.$_$.kc;
|
|
58
|
+
var stackTraceToString = kotlin_kotlin.$_$.ef;
|
|
59
|
+
var toString_0 = kotlin_kotlin.$_$.gf;
|
|
58
60
|
//endregion
|
|
59
61
|
//region block: pre-declaration
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
62
|
+
initMetadataForObject(CoreConfig, 'CoreConfig');
|
|
63
|
+
initMetadataForObject(CardNumberComparator, 'CardNumberComparator', VOID, VOID, [Comparator]);
|
|
64
|
+
initMetadataForObject(CardIndexComparator, 'CardIndexComparator', VOID, VOID, [Comparator]);
|
|
65
|
+
initMetadataForCompanion(Companion);
|
|
66
|
+
initMetadataForClass(CardName, 'CardName', VOID, Enum);
|
|
67
|
+
initMetadataForCompanion(Companion_0);
|
|
68
|
+
initMetadataForClass(GameCard, 'GameCard');
|
|
69
|
+
initMetadataForCompanion(Companion_1, VOID, [SerializerFactory]);
|
|
70
|
+
initMetadataForClass(Suit, 'Suit', VOID, Enum, VOID, VOID, VOID, {0: Companion_getInstance_1});
|
|
69
71
|
function standardShuffledCards$default(cards, times, $super) {
|
|
70
72
|
times = times === VOID ? 3 : times;
|
|
71
|
-
return $super === VOID ? this.
|
|
73
|
+
return $super === VOID ? this.r2m(cards, times) : $super.r2m.call(this, cards, times);
|
|
72
74
|
}
|
|
73
|
-
|
|
75
|
+
initMetadataForInterface(CardsDealerProvider, 'CardsDealerProvider');
|
|
74
76
|
function findCardsInRowCombinations$default(cards, supportedCombinations, checkFromIndex, includeCardNames, suit, $super) {
|
|
75
77
|
checkFromIndex = checkFromIndex === VOID ? first(supportedCombinations) : checkFromIndex;
|
|
76
78
|
includeCardNames = includeCardNames === VOID ? null : includeCardNames;
|
|
77
79
|
suit = suit === VOID ? null : suit;
|
|
78
|
-
return $super === VOID ? this.
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
setMetadataFor(Companion_3, 'Companion', objectMeta);
|
|
80
|
+
return $super === VOID ? this.t2m(cards, supportedCombinations, checkFromIndex, includeCardNames, suit) : $super.t2m.call(this, cards, supportedCombinations, checkFromIndex, includeCardNames, suit);
|
|
81
|
+
}
|
|
82
|
+
initMetadataForInterface(CombinationsCheckerProvider, 'CombinationsCheckerProvider');
|
|
83
|
+
initMetadataForClass(CombinationsCheckerProviderImpl, 'CombinationsCheckerProviderImpl', CombinationsCheckerProviderImpl, VOID, [CombinationsCheckerProvider]);
|
|
84
|
+
initMetadataForInterface(DealerReducer, 'DealerReducer');
|
|
85
|
+
initMetadataForClass(DealerReducerImpl, 'DealerReducerImpl', VOID, VOID, [DealerReducer]);
|
|
86
|
+
initMetadataForCompanion(Companion_2);
|
|
86
87
|
function d(tag, message, payload, $super) {
|
|
87
88
|
tag = tag === VOID ? null : tag;
|
|
88
89
|
payload = payload === VOID ? null : payload;
|
|
89
|
-
return this.
|
|
90
|
+
return this.e2n(tag, message, payload);
|
|
90
91
|
}
|
|
91
92
|
function e(tag, message, exception, payload, $super) {
|
|
92
93
|
tag = tag === VOID ? null : tag;
|
|
93
94
|
message = message === VOID ? null : message;
|
|
94
95
|
exception = exception === VOID ? null : exception;
|
|
95
96
|
payload = payload === VOID ? null : payload;
|
|
96
|
-
return this.
|
|
97
|
+
return this.f2n(tag, message, exception, payload);
|
|
97
98
|
}
|
|
98
|
-
function w(tag, message, payload, $super) {
|
|
99
|
+
function w(tag, message, exception, payload, $super) {
|
|
99
100
|
tag = tag === VOID ? null : tag;
|
|
101
|
+
message = message === VOID ? null : message;
|
|
102
|
+
exception = exception === VOID ? null : exception;
|
|
100
103
|
payload = payload === VOID ? null : payload;
|
|
101
|
-
return this.
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
104
|
+
return this.g2n(tag, message, exception, payload);
|
|
105
|
+
}
|
|
106
|
+
initMetadataForInterface(LoggerOutput, 'LoggerOutput');
|
|
107
|
+
initMetadataForInterface(RaspberryLogger, 'RaspberryLogger', VOID, VOID, [LoggerOutput]);
|
|
108
|
+
initMetadataForClass(CombinedRaspberryLogger, 'CombinedRaspberryLogger', VOID, VOID, [RaspberryLogger]);
|
|
109
|
+
initMetadataForInterface(LoggerEnabledTrigger, 'LoggerEnabledTrigger', VOID, VOID, [RaspberryLogger]);
|
|
110
|
+
initMetadataForInterface(LoggerPayload, 'LoggerPayload');
|
|
111
|
+
initMetadataForClass(PlatformRaspberryLogger, 'PlatformRaspberryLogger', PlatformRaspberryLogger, VOID, [RaspberryLogger, LoggerEnabledTrigger]);
|
|
112
|
+
initMetadataForClass(Category, 'Category', VOID, Enum);
|
|
113
|
+
initMetadataForClass(Logger$loggerSource$1);
|
|
114
|
+
initMetadataForObject(Logger, 'Logger');
|
|
115
|
+
initMetadataForClass(PlatformLogger, 'PlatformLogger', PlatformLogger);
|
|
113
116
|
//endregion
|
|
114
117
|
function CoreConfig() {
|
|
115
|
-
this.version = '0.0.
|
|
118
|
+
this.version = '0.0.19';
|
|
116
119
|
}
|
|
117
|
-
protoOf(CoreConfig).
|
|
120
|
+
protoOf(CoreConfig).z2l = function () {
|
|
118
121
|
return this.version;
|
|
119
122
|
};
|
|
120
123
|
var CoreConfig_instance;
|
|
@@ -126,23 +129,23 @@
|
|
|
126
129
|
var predicate = byCardNamePredicate(name.slice());
|
|
127
130
|
// Inline function 'kotlin.collections.filterTo' call
|
|
128
131
|
var destination = ArrayList_init_$Create$();
|
|
129
|
-
var tmp0_iterator = _this__u8e3s4.
|
|
130
|
-
while (tmp0_iterator.
|
|
131
|
-
var element = tmp0_iterator.
|
|
132
|
+
var tmp0_iterator = _this__u8e3s4.j();
|
|
133
|
+
while (tmp0_iterator.k()) {
|
|
134
|
+
var element = tmp0_iterator.l();
|
|
132
135
|
if (predicate(element)) {
|
|
133
|
-
destination.
|
|
136
|
+
destination.e(element);
|
|
134
137
|
}
|
|
135
138
|
}
|
|
136
139
|
return destination;
|
|
137
140
|
}
|
|
138
141
|
function CardNumberComparator() {
|
|
139
142
|
}
|
|
140
|
-
protoOf(CardNumberComparator).
|
|
141
|
-
return b.
|
|
143
|
+
protoOf(CardNumberComparator).a2m = function (a, b) {
|
|
144
|
+
return b.c2m() - a.c2m() | 0;
|
|
142
145
|
};
|
|
143
146
|
protoOf(CardNumberComparator).compare = function (a, b) {
|
|
144
147
|
var tmp = a instanceof GameCard ? a : THROW_CCE();
|
|
145
|
-
return this.
|
|
148
|
+
return this.a2m(tmp, b instanceof GameCard ? b : THROW_CCE());
|
|
146
149
|
};
|
|
147
150
|
var CardNumberComparator_instance;
|
|
148
151
|
function CardNumberComparator_getInstance() {
|
|
@@ -150,12 +153,12 @@
|
|
|
150
153
|
}
|
|
151
154
|
function CardIndexComparator() {
|
|
152
155
|
}
|
|
153
|
-
protoOf(CardIndexComparator).
|
|
154
|
-
return a.
|
|
156
|
+
protoOf(CardIndexComparator).a2m = function (a, b) {
|
|
157
|
+
return a.b2m_1 - b.b2m_1 | 0;
|
|
155
158
|
};
|
|
156
159
|
protoOf(CardIndexComparator).compare = function (a, b) {
|
|
157
160
|
var tmp = a instanceof GameCard ? a : THROW_CCE();
|
|
158
|
-
return this.
|
|
161
|
+
return this.a2m(tmp, b instanceof GameCard ? b : THROW_CCE());
|
|
159
162
|
};
|
|
160
163
|
var CardIndexComparator_instance;
|
|
161
164
|
function CardIndexComparator_getInstance() {
|
|
@@ -166,12 +169,12 @@
|
|
|
166
169
|
}
|
|
167
170
|
function distributeCardsBottom(_this__u8e3s4, count) {
|
|
168
171
|
var cardsToDeal = toList(take(_this__u8e3s4, count));
|
|
169
|
-
_this__u8e3s4.
|
|
172
|
+
_this__u8e3s4.x1(cardsToDeal);
|
|
170
173
|
return cardsToDeal;
|
|
171
174
|
}
|
|
172
175
|
function distributeCardsTop(_this__u8e3s4, count) {
|
|
173
176
|
var cardsToDeal = toList(takeLast(_this__u8e3s4, count));
|
|
174
|
-
_this__u8e3s4.
|
|
177
|
+
_this__u8e3s4.x1(cardsToDeal);
|
|
175
178
|
return cardsToDeal;
|
|
176
179
|
}
|
|
177
180
|
function byCardNamePredicate$lambda($types) {
|
|
@@ -186,7 +189,7 @@
|
|
|
186
189
|
var element = indexedObject[inductionVariable];
|
|
187
190
|
inductionVariable = inductionVariable + 1 | 0;
|
|
188
191
|
// Inline function 'io.raspberryapps.card_game.core.data.models.cards.byCardNamePredicate.<anonymous>.<anonymous>' call
|
|
189
|
-
if (p1.
|
|
192
|
+
if (p1.o2().equals(element)) {
|
|
190
193
|
tmp$ret$1 = true;
|
|
191
194
|
break $l$block;
|
|
192
195
|
}
|
|
@@ -212,7 +215,7 @@
|
|
|
212
215
|
var CardName_STUB_instance;
|
|
213
216
|
function getShortName($this) {
|
|
214
217
|
var tmp;
|
|
215
|
-
switch ($this.
|
|
218
|
+
switch ($this.n2_1) {
|
|
216
219
|
case 0:
|
|
217
220
|
tmp = 'A';
|
|
218
221
|
break;
|
|
@@ -283,10 +286,10 @@
|
|
|
283
286
|
}
|
|
284
287
|
function Companion() {
|
|
285
288
|
}
|
|
286
|
-
protoOf(Companion).
|
|
289
|
+
protoOf(Companion).d2m = function (suit, cardNumber) {
|
|
287
290
|
return new GameCard(getNumber(Companion_instance_0, cardNumber, suit));
|
|
288
291
|
};
|
|
289
|
-
protoOf(Companion).
|
|
292
|
+
protoOf(Companion).e2m = function (position, playerIndex, previousStubCardWithMaxIndex, reverse) {
|
|
290
293
|
var tmp;
|
|
291
294
|
if (previousStubCardWithMaxIndex == null) {
|
|
292
295
|
tmp = null;
|
|
@@ -295,7 +298,7 @@
|
|
|
295
298
|
// Inline function 'kotlin.contracts.contract' call
|
|
296
299
|
var tmp_0;
|
|
297
300
|
// Inline function 'io.raspberryapps.card_game.core.data.models.cards.Companion.createUniqueStub.<anonymous>' call
|
|
298
|
-
if (previousStubCardWithMaxIndex.
|
|
301
|
+
if (previousStubCardWithMaxIndex.f2m()) {
|
|
299
302
|
tmp_0 = previousStubCardWithMaxIndex;
|
|
300
303
|
} else {
|
|
301
304
|
tmp_0 = null;
|
|
@@ -303,8 +306,8 @@
|
|
|
303
306
|
tmp = tmp_0;
|
|
304
307
|
}
|
|
305
308
|
var tmp1_safe_receiver = tmp;
|
|
306
|
-
var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.
|
|
307
|
-
var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : Companion_instance_0.
|
|
309
|
+
var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.b2m_1;
|
|
310
|
+
var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : Companion_instance_0.k2m(tmp2_safe_receiver, playerIndex, reverse);
|
|
308
311
|
var tmp_1;
|
|
309
312
|
if (tmp3_safe_receiver == null) {
|
|
310
313
|
tmp_1 = null;
|
|
@@ -325,10 +328,10 @@
|
|
|
325
328
|
var index = tmp_2;
|
|
326
329
|
return new GameCard(index);
|
|
327
330
|
};
|
|
328
|
-
protoOf(Companion).
|
|
331
|
+
protoOf(Companion).l2m = function (position, playerIndex, previousStubCardWithMaxIndex, reverse, $super) {
|
|
329
332
|
previousStubCardWithMaxIndex = previousStubCardWithMaxIndex === VOID ? null : previousStubCardWithMaxIndex;
|
|
330
333
|
reverse = reverse === VOID ? false : reverse;
|
|
331
|
-
return $super === VOID ? this.
|
|
334
|
+
return $super === VOID ? this.e2m(position, playerIndex, previousStubCardWithMaxIndex, reverse) : $super.e2m.call(this, position, playerIndex, previousStubCardWithMaxIndex, reverse);
|
|
332
335
|
};
|
|
333
336
|
var Companion_instance;
|
|
334
337
|
function Companion_getInstance() {
|
|
@@ -339,7 +342,7 @@
|
|
|
339
342
|
}
|
|
340
343
|
function getCardNumber($this, number) {
|
|
341
344
|
var tmp;
|
|
342
|
-
switch (number.
|
|
345
|
+
switch (number.n2_1) {
|
|
343
346
|
case 12:
|
|
344
347
|
tmp = 0;
|
|
345
348
|
break;
|
|
@@ -380,7 +383,7 @@
|
|
|
380
383
|
tmp = 12;
|
|
381
384
|
break;
|
|
382
385
|
default:
|
|
383
|
-
throw IllegalStateException_init_$Create$('Invalid CardNumber ' + number);
|
|
386
|
+
throw IllegalStateException_init_$Create$('Invalid CardNumber ' + number.toString());
|
|
384
387
|
}
|
|
385
388
|
return tmp;
|
|
386
389
|
}
|
|
@@ -432,7 +435,7 @@
|
|
|
432
435
|
return tmp;
|
|
433
436
|
}
|
|
434
437
|
function _get_isShirt__vd98rp($this) {
|
|
435
|
-
return $this.
|
|
438
|
+
return $this.b2m_1 === 52;
|
|
436
439
|
}
|
|
437
440
|
function CardName(name, ordinal) {
|
|
438
441
|
Enum.call(this, name, ordinal);
|
|
@@ -441,12 +444,12 @@
|
|
|
441
444
|
return getShortName(this);
|
|
442
445
|
};
|
|
443
446
|
function Companion_0() {
|
|
444
|
-
this.
|
|
445
|
-
this.
|
|
446
|
-
this.
|
|
447
|
-
this.
|
|
447
|
+
this.g2m_1 = -1;
|
|
448
|
+
this.h2m_1 = 13;
|
|
449
|
+
this.i2m_1 = 52;
|
|
450
|
+
this.j2m_1 = 53;
|
|
448
451
|
}
|
|
449
|
-
protoOf(Companion_0).
|
|
452
|
+
protoOf(Companion_0).k2m = function (_this__u8e3s4, playerIndex, reverse) {
|
|
450
453
|
var tmp;
|
|
451
454
|
if (reverse) {
|
|
452
455
|
tmp = _this__u8e3s4 + (53 + imul(playerIndex, 14) | 0) | 0;
|
|
@@ -516,59 +519,59 @@
|
|
|
516
519
|
return CardName_STUB_instance;
|
|
517
520
|
}
|
|
518
521
|
function GameCard(index) {
|
|
519
|
-
this.
|
|
522
|
+
this.b2m_1 = index;
|
|
520
523
|
}
|
|
521
|
-
protoOf(GameCard).
|
|
524
|
+
protoOf(GameCard).m2m = function () {
|
|
522
525
|
var tmp;
|
|
523
|
-
var containsArg = this.
|
|
526
|
+
var containsArg = this.b2m_1;
|
|
524
527
|
if (0 <= containsArg ? containsArg <= 13 : false) {
|
|
525
528
|
tmp = Suit_DIAMOND_getInstance();
|
|
526
529
|
} else {
|
|
527
|
-
if (this.
|
|
530
|
+
if (this.b2m_1 <= 26) {
|
|
528
531
|
tmp = Suit_SPADE_getInstance();
|
|
529
532
|
} else {
|
|
530
|
-
if (this.
|
|
533
|
+
if (this.b2m_1 <= 39) {
|
|
531
534
|
tmp = Suit_HEART_getInstance();
|
|
532
535
|
} else {
|
|
533
|
-
if (this.
|
|
536
|
+
if (this.b2m_1 <= 52) {
|
|
534
537
|
tmp = Suit_CLUB_getInstance();
|
|
535
538
|
} else {
|
|
536
|
-
throw IllegalStateException_init_$Create$('Invalid suitCard in Card.getValue() ' + this.
|
|
539
|
+
throw IllegalStateException_init_$Create$('Invalid suitCard in Card.getValue() ' + this.b2m_1);
|
|
537
540
|
}
|
|
538
541
|
}
|
|
539
542
|
}
|
|
540
543
|
}
|
|
541
544
|
return tmp;
|
|
542
545
|
};
|
|
543
|
-
protoOf(GameCard).
|
|
546
|
+
protoOf(GameCard).c2m = function () {
|
|
544
547
|
var tmp;
|
|
545
|
-
if (this.
|
|
548
|
+
if (this.f2m()) {
|
|
546
549
|
tmp = -1;
|
|
547
550
|
} else {
|
|
548
|
-
tmp = this.
|
|
551
|
+
tmp = this.b2m_1 - imul(13, getIndex(this.m2m())) | 0;
|
|
549
552
|
}
|
|
550
553
|
return tmp;
|
|
551
554
|
};
|
|
552
|
-
protoOf(GameCard).
|
|
553
|
-
return this.
|
|
555
|
+
protoOf(GameCard).o2 = function () {
|
|
556
|
+
return this.f2m() ? CardName_STUB_getInstance() : getName(Companion_instance_0, this.c2m());
|
|
554
557
|
};
|
|
555
|
-
protoOf(GameCard).
|
|
556
|
-
return !_get_isShirt__vd98rp(this)
|
|
558
|
+
protoOf(GameCard).n2m = function () {
|
|
559
|
+
return !_get_isShirt__vd98rp(this) && !this.f2m();
|
|
557
560
|
};
|
|
558
|
-
protoOf(GameCard).
|
|
559
|
-
return this.
|
|
561
|
+
protoOf(GameCard).f2m = function () {
|
|
562
|
+
return this.b2m_1 >= 53;
|
|
560
563
|
};
|
|
561
564
|
protoOf(GameCard).toString = function () {
|
|
562
565
|
if (_get_isShirt__vd98rp(this)) {
|
|
563
566
|
return 'GameCard(SHIRT)';
|
|
564
567
|
}
|
|
565
|
-
if (this.
|
|
566
|
-
return 'GameCard(STUB, ' + this.
|
|
568
|
+
if (this.f2m()) {
|
|
569
|
+
return 'GameCard(STUB, ' + this.b2m_1 + ')';
|
|
567
570
|
}
|
|
568
|
-
return 'GameCard(' + this.
|
|
571
|
+
return 'GameCard(' + this.m2m().toString() + this.o2().toString() + ', ' + this.b2m_1 + ')';
|
|
569
572
|
};
|
|
570
573
|
protoOf(GameCard).hashCode = function () {
|
|
571
|
-
return this.
|
|
574
|
+
return this.b2m_1;
|
|
572
575
|
};
|
|
573
576
|
protoOf(GameCard).equals = function (other) {
|
|
574
577
|
if (this === other)
|
|
@@ -576,12 +579,12 @@
|
|
|
576
579
|
if (!(other instanceof GameCard))
|
|
577
580
|
return false;
|
|
578
581
|
var tmp0_other_with_cast = other instanceof GameCard ? other : THROW_CCE();
|
|
579
|
-
if (!(this.
|
|
582
|
+
if (!(this.b2m_1 === tmp0_other_with_cast.b2m_1))
|
|
580
583
|
return false;
|
|
581
584
|
return true;
|
|
582
585
|
};
|
|
583
586
|
function _get_$cachedSerializer__te6jhj($this) {
|
|
584
|
-
return $this.
|
|
587
|
+
return $this.o2m_1.e2();
|
|
585
588
|
}
|
|
586
589
|
function Suit$Companion$_anonymous__cbm2iq() {
|
|
587
590
|
return createSimpleEnumSerializer('io.raspberryapps.card_game.core.data.models.cards.Suit', values());
|
|
@@ -592,18 +595,18 @@
|
|
|
592
595
|
var Suit_CLUB_instance;
|
|
593
596
|
function getSuitEmoji($this) {
|
|
594
597
|
var tmp;
|
|
595
|
-
switch ($this.
|
|
598
|
+
switch ($this.n2_1) {
|
|
596
599
|
case 0:
|
|
597
600
|
tmp = '\u2666\uFE0F';
|
|
598
601
|
break;
|
|
599
602
|
case 1:
|
|
600
|
-
tmp = '\
|
|
603
|
+
tmp = '\u2663\uFE0F\uFE0F';
|
|
601
604
|
break;
|
|
602
605
|
case 2:
|
|
603
|
-
tmp = '\
|
|
606
|
+
tmp = '\u2665\uFE0F';
|
|
604
607
|
break;
|
|
605
608
|
case 3:
|
|
606
|
-
tmp = '\
|
|
609
|
+
tmp = '\u2660\uFE0F';
|
|
607
610
|
break;
|
|
608
611
|
default:
|
|
609
612
|
noWhenBranchMatchedException();
|
|
@@ -615,13 +618,13 @@
|
|
|
615
618
|
Companion_instance_1 = this;
|
|
616
619
|
var tmp = this;
|
|
617
620
|
var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
618
|
-
tmp.
|
|
621
|
+
tmp.o2m_1 = lazy(tmp_0, Suit$Companion$_anonymous__cbm2iq);
|
|
619
622
|
}
|
|
620
|
-
protoOf(Companion_1).
|
|
623
|
+
protoOf(Companion_1).o22 = function () {
|
|
621
624
|
return _get_$cachedSerializer__te6jhj(this);
|
|
622
625
|
};
|
|
623
|
-
protoOf(Companion_1).
|
|
624
|
-
return this.
|
|
626
|
+
protoOf(Companion_1).e1r = function (typeParamsSerializers) {
|
|
627
|
+
return this.o22();
|
|
625
628
|
};
|
|
626
629
|
var Companion_instance_1;
|
|
627
630
|
function Companion_getInstance_1() {
|
|
@@ -674,7 +677,7 @@
|
|
|
674
677
|
}
|
|
675
678
|
function getIndex(_this__u8e3s4) {
|
|
676
679
|
var tmp;
|
|
677
|
-
switch (_this__u8e3s4.
|
|
680
|
+
switch (_this__u8e3s4.n2_1) {
|
|
678
681
|
case 0:
|
|
679
682
|
tmp = 0;
|
|
680
683
|
break;
|
|
@@ -698,17 +701,17 @@
|
|
|
698
701
|
function CombinationsCheckerProvider() {
|
|
699
702
|
}
|
|
700
703
|
function createCombination($this, cards, supportedCombinations) {
|
|
701
|
-
var size = cards.
|
|
702
|
-
if (supportedCombinations.
|
|
704
|
+
var size = cards.m();
|
|
705
|
+
if (supportedCombinations.q1(size)) {
|
|
703
706
|
return cards;
|
|
704
707
|
}
|
|
705
708
|
var fromLongestCombinations = asReversed(sorted(supportedCombinations));
|
|
706
709
|
var tmp$ret$1;
|
|
707
710
|
$l$block: {
|
|
708
711
|
// Inline function 'kotlin.collections.first' call
|
|
709
|
-
var tmp0_iterator = fromLongestCombinations.
|
|
710
|
-
while (tmp0_iterator.
|
|
711
|
-
var element = tmp0_iterator.
|
|
712
|
+
var tmp0_iterator = fromLongestCombinations.j();
|
|
713
|
+
while (tmp0_iterator.k()) {
|
|
714
|
+
var element = tmp0_iterator.l();
|
|
712
715
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.combinations.CombinationsCheckerProviderImpl.createCombination.<anonymous>' call
|
|
713
716
|
if (element <= size) {
|
|
714
717
|
tmp$ret$1 = element;
|
|
@@ -722,17 +725,17 @@
|
|
|
722
725
|
}
|
|
723
726
|
function CombinationsCheckerProviderImpl() {
|
|
724
727
|
}
|
|
725
|
-
protoOf(CombinationsCheckerProviderImpl).
|
|
728
|
+
protoOf(CombinationsCheckerProviderImpl).t2m = function (cards, supportedCombinations, checkFromIndex, includeCardNames, suit) {
|
|
726
729
|
// Inline function 'kotlin.collections.filter' call
|
|
727
730
|
// Inline function 'kotlin.collections.filterTo' call
|
|
728
731
|
var this_0 = sortedWith(cards, CardIndexComparator_instance);
|
|
729
732
|
var destination = ArrayList_init_$Create$();
|
|
730
|
-
var tmp0_iterator = this_0.
|
|
731
|
-
while (tmp0_iterator.
|
|
732
|
-
var element = tmp0_iterator.
|
|
733
|
+
var tmp0_iterator = this_0.j();
|
|
734
|
+
while (tmp0_iterator.k()) {
|
|
735
|
+
var element = tmp0_iterator.l();
|
|
733
736
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.combinations.CombinationsCheckerProviderImpl.findCardsInRowCombinations.<anonymous>' call
|
|
734
|
-
if (element.
|
|
735
|
-
destination.
|
|
737
|
+
if (element.n2m()) {
|
|
738
|
+
destination.e(element);
|
|
736
739
|
}
|
|
737
740
|
}
|
|
738
741
|
var sortedCards = toList(destination);
|
|
@@ -741,44 +744,44 @@
|
|
|
741
744
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
742
745
|
var combinationCards = ArrayList_init_$Create$();
|
|
743
746
|
var inductionVariable = 0;
|
|
744
|
-
var last = sortedCards.
|
|
747
|
+
var last = sortedCards.m() - 1 | 0;
|
|
745
748
|
if (inductionVariable <= last)
|
|
746
749
|
do {
|
|
747
750
|
var i = inductionVariable;
|
|
748
751
|
inductionVariable = inductionVariable + 1 | 0;
|
|
749
752
|
var previousCard = lastOrNull(combinationCards);
|
|
750
|
-
var currentCard = sortedCards.
|
|
751
|
-
var isNextInRow =
|
|
752
|
-
var passedCardNamesCheck = includeCardNames == null
|
|
753
|
-
var passedSuitCheck = suit == null
|
|
754
|
-
if (
|
|
755
|
-
combinationCards.
|
|
753
|
+
var currentCard = sortedCards.o(i);
|
|
754
|
+
var isNextInRow = !(previousCard == null) && currentCard.b2m_1 === (previousCard.b2m_1 + 1 | 0) && currentCard.m2m().equals(previousCard.m2m());
|
|
755
|
+
var passedCardNamesCheck = includeCardNames == null || includeCardNames.q1(currentCard.o2());
|
|
756
|
+
var passedSuitCheck = suit == null || currentCard.m2m().equals(suit);
|
|
757
|
+
if (isNextInRow && passedSuitCheck && passedCardNamesCheck) {
|
|
758
|
+
combinationCards.e(currentCard);
|
|
756
759
|
} else {
|
|
757
|
-
if (combinationCards.
|
|
758
|
-
combinations.
|
|
760
|
+
if (combinationCards.m() > (checkFromIndex - 1 | 0)) {
|
|
761
|
+
combinations.n(this.v2m(toMutableList(combinationCards), supportedCombinations));
|
|
759
762
|
}
|
|
760
|
-
combinationCards.
|
|
761
|
-
if (passedSuitCheck
|
|
762
|
-
combinationCards.
|
|
763
|
+
combinationCards.z1();
|
|
764
|
+
if (passedSuitCheck && passedCardNamesCheck) {
|
|
765
|
+
combinationCards.e(currentCard);
|
|
763
766
|
}
|
|
764
767
|
}
|
|
765
768
|
}
|
|
766
769
|
while (inductionVariable <= last);
|
|
767
|
-
if (combinationCards.
|
|
768
|
-
combinations.
|
|
770
|
+
if (combinationCards.m() > (checkFromIndex - 1 | 0)) {
|
|
771
|
+
combinations.n(this.v2m(toMutableList(combinationCards), supportedCombinations));
|
|
769
772
|
}
|
|
770
773
|
return combinations;
|
|
771
774
|
};
|
|
772
|
-
protoOf(CombinationsCheckerProviderImpl).
|
|
775
|
+
protoOf(CombinationsCheckerProviderImpl).v2m = function (cards, supportedCombinations) {
|
|
773
776
|
// Inline function 'kotlin.collections.minOf' call
|
|
774
|
-
var iterator = supportedCombinations.
|
|
775
|
-
if (!iterator.
|
|
777
|
+
var iterator = supportedCombinations.j();
|
|
778
|
+
if (!iterator.k())
|
|
776
779
|
throw NoSuchElementException_init_$Create$_0();
|
|
777
780
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.combinations.CombinationsCheckerProviderImpl.createCombinationsFromCardsInRow.<anonymous>' call
|
|
778
|
-
var minValue = iterator.
|
|
779
|
-
while (iterator.
|
|
781
|
+
var minValue = iterator.l();
|
|
782
|
+
while (iterator.k()) {
|
|
780
783
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.combinations.CombinationsCheckerProviderImpl.createCombinationsFromCardsInRow.<anonymous>' call
|
|
781
|
-
var v = iterator.
|
|
784
|
+
var v = iterator.l();
|
|
782
785
|
if (compareTo(minValue, v) > 0) {
|
|
783
786
|
minValue = v;
|
|
784
787
|
}
|
|
@@ -787,136 +790,129 @@
|
|
|
787
790
|
var cardsToCheck = cards;
|
|
788
791
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
789
792
|
var combinations = ArrayList_init_$Create$();
|
|
790
|
-
while (cardsToCheck.
|
|
793
|
+
while (cardsToCheck.m() >= shortestCombinationSupport) {
|
|
791
794
|
var combinationCards = createCombination(this, cardsToCheck, supportedCombinations);
|
|
792
|
-
combinations.
|
|
795
|
+
combinations.e(combinationCards);
|
|
793
796
|
// Inline function 'kotlin.apply' call
|
|
794
797
|
var this_0 = toMutableList(cardsToCheck);
|
|
795
798
|
// Inline function 'kotlin.contracts.contract' call
|
|
796
799
|
// Inline function 'io.raspberryapps.card_game.core.data.providers.combinations.CombinationsCheckerProviderImpl.createCombinationsFromCardsInRow.<anonymous>' call
|
|
797
|
-
this_0.
|
|
800
|
+
this_0.x1(combinationCards);
|
|
798
801
|
cardsToCheck = this_0;
|
|
799
802
|
}
|
|
800
803
|
return combinations;
|
|
801
804
|
};
|
|
802
805
|
function DealerReducerImpl(logger, enableLogs) {
|
|
803
|
-
this.
|
|
804
|
-
this.
|
|
806
|
+
this.w2m_1 = logger;
|
|
807
|
+
this.x2m_1 = enableLogs;
|
|
805
808
|
}
|
|
806
|
-
protoOf(DealerReducerImpl).
|
|
809
|
+
protoOf(DealerReducerImpl).y2m = function (cards, cardsToRemove) {
|
|
807
810
|
var list = cards;
|
|
808
|
-
var tmp0_iterator = cardsToRemove.
|
|
809
|
-
while (tmp0_iterator.
|
|
810
|
-
var gameCard = tmp0_iterator.
|
|
811
|
-
list = this.
|
|
811
|
+
var tmp0_iterator = cardsToRemove.j();
|
|
812
|
+
while (tmp0_iterator.k()) {
|
|
813
|
+
var gameCard = tmp0_iterator.l();
|
|
814
|
+
list = this.z2m(list, gameCard);
|
|
812
815
|
}
|
|
813
816
|
return list;
|
|
814
817
|
};
|
|
815
|
-
protoOf(DealerReducerImpl).
|
|
818
|
+
protoOf(DealerReducerImpl).z2m = function (cards, cardToRemove) {
|
|
816
819
|
var tmp;
|
|
817
|
-
if (!cardToRemove.
|
|
818
|
-
if (this.
|
|
819
|
-
this.
|
|
820
|
+
if (!cardToRemove.f2m() && cards.q1(cardToRemove)) {
|
|
821
|
+
if (this.x2m_1) {
|
|
822
|
+
this.w2m_1.d('Dealer', 'Card removed: ' + cardToRemove.toString() + ', size: ' + (cards.m() - 1 | 0));
|
|
820
823
|
}
|
|
821
824
|
tmp = minus(cards, cardToRemove);
|
|
822
825
|
} else {
|
|
823
|
-
if (this.
|
|
824
|
-
this.
|
|
826
|
+
if (this.x2m_1) {
|
|
827
|
+
this.w2m_1.d('Dealer', 'Card removed as stub: ' + cardToRemove.toString() + ', size: ' + (cards.m() - 1 | 0));
|
|
825
828
|
}
|
|
826
829
|
// Inline function 'kotlin.collections.filterNot' call
|
|
827
830
|
// Inline function 'kotlin.collections.filterNotTo' call
|
|
828
831
|
var destination = ArrayList_init_$Create$();
|
|
829
|
-
var tmp0_iterator = cards.
|
|
830
|
-
while (tmp0_iterator.
|
|
831
|
-
var element = tmp0_iterator.
|
|
832
|
+
var tmp0_iterator = cards.j();
|
|
833
|
+
while (tmp0_iterator.k()) {
|
|
834
|
+
var element = tmp0_iterator.l();
|
|
832
835
|
// Inline function 'io.raspberryapps.card_game.core.domain.dealer.DealerReducerImpl.removeCard.<anonymous>' call
|
|
833
|
-
if (!element.
|
|
834
|
-
destination.
|
|
836
|
+
if (!element.f2m()) {
|
|
837
|
+
destination.e(element);
|
|
835
838
|
}
|
|
836
839
|
}
|
|
837
840
|
var notStubCards = destination;
|
|
838
841
|
// Inline function 'kotlin.collections.filter' call
|
|
839
842
|
// Inline function 'kotlin.collections.filterTo' call
|
|
840
843
|
var destination_0 = ArrayList_init_$Create$();
|
|
841
|
-
var tmp0_iterator_0 = cards.
|
|
842
|
-
while (tmp0_iterator_0.
|
|
843
|
-
var element_0 = tmp0_iterator_0.
|
|
844
|
+
var tmp0_iterator_0 = cards.j();
|
|
845
|
+
while (tmp0_iterator_0.k()) {
|
|
846
|
+
var element_0 = tmp0_iterator_0.l();
|
|
844
847
|
// Inline function 'io.raspberryapps.card_game.core.domain.dealer.DealerReducerImpl.removeCard.<anonymous>' call
|
|
845
|
-
if (element_0.
|
|
846
|
-
destination_0.
|
|
848
|
+
if (element_0.f2m()) {
|
|
849
|
+
destination_0.e(element_0);
|
|
847
850
|
}
|
|
848
851
|
}
|
|
849
852
|
var stubCards = destination_0;
|
|
850
|
-
if (stubCards.
|
|
851
|
-
this.
|
|
853
|
+
if (stubCards.p()) {
|
|
854
|
+
this.w2m_1.w('Dealer', "Can't find card to delete for player, " + ('cards:' + toString(cards) + ', ') + ('cardToRemove: ' + cardToRemove.toString()));
|
|
852
855
|
}
|
|
853
856
|
tmp = plus(notStubCards, dropLast(stubCards, 1));
|
|
854
857
|
}
|
|
855
858
|
return tmp;
|
|
856
859
|
};
|
|
857
|
-
protoOf(DealerReducerImpl).
|
|
858
|
-
if (this.
|
|
859
|
-
this.
|
|
860
|
+
protoOf(DealerReducerImpl).a2n = function (cards, cardToAdd) {
|
|
861
|
+
if (this.x2m_1) {
|
|
862
|
+
this.w2m_1.d('Dealer', 'Card added: ' + cardToAdd.toString() + ', size: ' + (cards.m() + 1 | 0));
|
|
860
863
|
}
|
|
861
|
-
if (cards.
|
|
862
|
-
this.
|
|
864
|
+
if (cards.q1(cardToAdd)) {
|
|
865
|
+
this.w2m_1.w('Dealer', 'Card already exists for player, ' + ('cards:' + toString(cards) + ', ') + ('cardToAdd: ' + cardToAdd.toString()));
|
|
863
866
|
}
|
|
864
867
|
return plus_0(cards, cardToAdd);
|
|
865
868
|
};
|
|
866
|
-
function Companion_2() {
|
|
867
|
-
this.r2l_1 = 'Dealer';
|
|
868
|
-
}
|
|
869
|
-
var Companion_instance_2;
|
|
870
|
-
function Companion_getInstance_2() {
|
|
871
|
-
return Companion_instance_2;
|
|
872
|
-
}
|
|
873
869
|
function DealerReducer() {
|
|
874
870
|
}
|
|
875
|
-
function
|
|
871
|
+
function Companion_2() {
|
|
876
872
|
}
|
|
877
|
-
protoOf(
|
|
873
|
+
protoOf(Companion_2).b2n = function () {
|
|
878
874
|
return new CombinedRaspberryLogger(mutableListOf([new PlatformRaspberryLogger()]));
|
|
879
875
|
};
|
|
880
|
-
protoOf(
|
|
876
|
+
protoOf(Companion_2).k1o = function () {
|
|
881
877
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
882
878
|
var tmp$ret$0 = ArrayList_init_$Create$();
|
|
883
879
|
return new CombinedRaspberryLogger(tmp$ret$0);
|
|
884
880
|
};
|
|
885
|
-
var
|
|
886
|
-
function
|
|
887
|
-
return
|
|
881
|
+
var Companion_instance_2;
|
|
882
|
+
function Companion_getInstance_2() {
|
|
883
|
+
return Companion_instance_2;
|
|
888
884
|
}
|
|
889
885
|
function CombinedRaspberryLogger(logOutputs) {
|
|
890
|
-
this.
|
|
886
|
+
this.c2n_1 = logOutputs;
|
|
891
887
|
}
|
|
892
|
-
protoOf(CombinedRaspberryLogger).
|
|
893
|
-
this.
|
|
888
|
+
protoOf(CombinedRaspberryLogger).d2n = function (output) {
|
|
889
|
+
this.c2n_1.e(output);
|
|
894
890
|
};
|
|
895
|
-
protoOf(CombinedRaspberryLogger).
|
|
891
|
+
protoOf(CombinedRaspberryLogger).e2n = function (tag, message, payload) {
|
|
896
892
|
// Inline function 'kotlin.collections.forEach' call
|
|
897
|
-
var tmp0_iterator = this.
|
|
898
|
-
while (tmp0_iterator.
|
|
899
|
-
var element = tmp0_iterator.
|
|
893
|
+
var tmp0_iterator = this.c2n_1.j();
|
|
894
|
+
while (tmp0_iterator.k()) {
|
|
895
|
+
var element = tmp0_iterator.l();
|
|
900
896
|
// Inline function 'io.raspberryapps.card_game.core.utils.logger.CombinedRaspberryLogger.d.<anonymous>' call
|
|
901
897
|
element.d(tag, message, payload);
|
|
902
898
|
}
|
|
903
899
|
};
|
|
904
|
-
protoOf(CombinedRaspberryLogger).
|
|
900
|
+
protoOf(CombinedRaspberryLogger).f2n = function (tag, message, exception, payload) {
|
|
905
901
|
// Inline function 'kotlin.collections.forEach' call
|
|
906
|
-
var tmp0_iterator = this.
|
|
907
|
-
while (tmp0_iterator.
|
|
908
|
-
var element = tmp0_iterator.
|
|
902
|
+
var tmp0_iterator = this.c2n_1.j();
|
|
903
|
+
while (tmp0_iterator.k()) {
|
|
904
|
+
var element = tmp0_iterator.l();
|
|
909
905
|
// Inline function 'io.raspberryapps.card_game.core.utils.logger.CombinedRaspberryLogger.e.<anonymous>' call
|
|
910
906
|
element.e(tag, message, exception, payload);
|
|
911
907
|
}
|
|
912
908
|
};
|
|
913
|
-
protoOf(CombinedRaspberryLogger).
|
|
909
|
+
protoOf(CombinedRaspberryLogger).g2n = function (tag, message, exception, payload) {
|
|
914
910
|
// Inline function 'kotlin.collections.forEach' call
|
|
915
|
-
var tmp0_iterator = this.
|
|
916
|
-
while (tmp0_iterator.
|
|
917
|
-
var element = tmp0_iterator.
|
|
911
|
+
var tmp0_iterator = this.c2n_1.j();
|
|
912
|
+
while (tmp0_iterator.k()) {
|
|
913
|
+
var element = tmp0_iterator.l();
|
|
918
914
|
// Inline function 'io.raspberryapps.card_game.core.utils.logger.CombinedRaspberryLogger.w.<anonymous>' call
|
|
919
|
-
element.w(tag, message, payload);
|
|
915
|
+
element.w(tag, message, exception, payload);
|
|
920
916
|
}
|
|
921
917
|
};
|
|
922
918
|
function LoggerEnabledTrigger() {
|
|
@@ -925,28 +921,28 @@
|
|
|
925
921
|
}
|
|
926
922
|
function PlatformRaspberryLogger(enabled) {
|
|
927
923
|
enabled = enabled === VOID ? true : enabled;
|
|
928
|
-
this.
|
|
924
|
+
this.j2n_1 = enabled;
|
|
929
925
|
}
|
|
930
|
-
protoOf(PlatformRaspberryLogger).
|
|
931
|
-
this.
|
|
926
|
+
protoOf(PlatformRaspberryLogger).h2n = function (_set____db54di) {
|
|
927
|
+
this.j2n_1 = _set____db54di;
|
|
932
928
|
};
|
|
933
|
-
protoOf(PlatformRaspberryLogger).
|
|
934
|
-
return this.
|
|
929
|
+
protoOf(PlatformRaspberryLogger).i2n = function () {
|
|
930
|
+
return this.j2n_1;
|
|
935
931
|
};
|
|
936
|
-
protoOf(PlatformRaspberryLogger).
|
|
937
|
-
if (!this.
|
|
932
|
+
protoOf(PlatformRaspberryLogger).e2n = function (tag, message, payload) {
|
|
933
|
+
if (!this.j2n_1)
|
|
938
934
|
return Unit_instance;
|
|
939
|
-
Logger_getInstance().
|
|
935
|
+
Logger_getInstance().n2n(tag, message);
|
|
940
936
|
};
|
|
941
|
-
protoOf(PlatformRaspberryLogger).
|
|
942
|
-
if (!this.
|
|
937
|
+
protoOf(PlatformRaspberryLogger).f2n = function (tag, message, exception, payload) {
|
|
938
|
+
if (!this.j2n_1)
|
|
943
939
|
return Unit_instance;
|
|
944
|
-
Logger_getInstance().
|
|
940
|
+
Logger_getInstance().o2n(tag, message, exception);
|
|
945
941
|
};
|
|
946
|
-
protoOf(PlatformRaspberryLogger).
|
|
947
|
-
if (!this.
|
|
942
|
+
protoOf(PlatformRaspberryLogger).g2n = function (tag, message, exception, payload) {
|
|
943
|
+
if (!this.j2n_1)
|
|
948
944
|
return Unit_instance;
|
|
949
|
-
Logger_getInstance().
|
|
945
|
+
Logger_getInstance().p2n(tag, message, exception);
|
|
950
946
|
};
|
|
951
947
|
function RaspberryLogger() {
|
|
952
948
|
}
|
|
@@ -963,23 +959,23 @@
|
|
|
963
959
|
Category_NONE_instance = new Category('NONE', 1, true);
|
|
964
960
|
}
|
|
965
961
|
function generateTag($this, tag) {
|
|
966
|
-
return
|
|
962
|
+
return !($this.m2n_1 == null) && !(tag == null) ? '' + $this.m2n_1 + ':' + tag : tag;
|
|
967
963
|
}
|
|
968
964
|
function Category(name, ordinal, isEnabled) {
|
|
969
965
|
Enum.call(this, name, ordinal);
|
|
970
|
-
this.
|
|
966
|
+
this.s2n_1 = isEnabled;
|
|
971
967
|
}
|
|
972
968
|
function Logger$loggerSource$1() {
|
|
973
|
-
this.
|
|
969
|
+
this.t2n_1 = new PlatformLogger();
|
|
974
970
|
}
|
|
975
|
-
protoOf(Logger$loggerSource$1).
|
|
976
|
-
this.
|
|
971
|
+
protoOf(Logger$loggerSource$1).u2n = function (tag, msg) {
|
|
972
|
+
this.t2n_1.u2n(tag, msg);
|
|
977
973
|
};
|
|
978
|
-
protoOf(Logger$loggerSource$1).
|
|
979
|
-
this.
|
|
974
|
+
protoOf(Logger$loggerSource$1).v2n = function (tag, msg, exception) {
|
|
975
|
+
this.t2n_1.v2n(tag, msg, exception);
|
|
980
976
|
};
|
|
981
|
-
protoOf(Logger$loggerSource$1).
|
|
982
|
-
this.
|
|
977
|
+
protoOf(Logger$loggerSource$1).w2n = function (tag, msg, exception) {
|
|
978
|
+
this.t2n_1.w2n(tag, msg, exception);
|
|
983
979
|
};
|
|
984
980
|
function Category_NONE_getInstance() {
|
|
985
981
|
Category_initEntries();
|
|
@@ -988,56 +984,63 @@
|
|
|
988
984
|
function Logger() {
|
|
989
985
|
Logger_instance = this;
|
|
990
986
|
var tmp = this;
|
|
991
|
-
tmp.
|
|
992
|
-
this.
|
|
993
|
-
this.
|
|
987
|
+
tmp.k2n_1 = new Logger$loggerSource$1();
|
|
988
|
+
this.l2n_1 = true;
|
|
989
|
+
this.m2n_1 = null;
|
|
994
990
|
}
|
|
995
|
-
protoOf(Logger).
|
|
996
|
-
this.
|
|
991
|
+
protoOf(Logger).n2n = function (tag, message) {
|
|
992
|
+
this.x2n(tag, message, Category_NONE_getInstance());
|
|
997
993
|
};
|
|
998
|
-
protoOf(Logger).
|
|
999
|
-
if (this.
|
|
1000
|
-
|
|
994
|
+
protoOf(Logger).y2n = function (tag, message, exception, category) {
|
|
995
|
+
if (this.l2n_1 && category.s2n_1) {
|
|
996
|
+
if (exception == null)
|
|
997
|
+
null;
|
|
998
|
+
else {
|
|
999
|
+
printStackTrace(exception);
|
|
1000
|
+
}
|
|
1001
|
+
this.k2n_1.w2n(generateTag(this, tag), generateMsg(message, exception), exception);
|
|
1001
1002
|
}
|
|
1002
1003
|
};
|
|
1003
|
-
protoOf(Logger).
|
|
1004
|
+
protoOf(Logger).p2n = function (tag, message, exception, category, $super) {
|
|
1004
1005
|
tag = tag === VOID ? null : tag;
|
|
1006
|
+
message = message === VOID ? null : message;
|
|
1007
|
+
exception = exception === VOID ? null : exception;
|
|
1005
1008
|
category = category === VOID ? Category_NONE_getInstance() : category;
|
|
1006
1009
|
var tmp;
|
|
1007
1010
|
if ($super === VOID) {
|
|
1008
|
-
this.
|
|
1011
|
+
this.y2n(tag, message, exception, category);
|
|
1009
1012
|
tmp = Unit_instance;
|
|
1010
1013
|
} else {
|
|
1011
|
-
tmp = $super.
|
|
1014
|
+
tmp = $super.y2n.call(this, tag, message, exception, category);
|
|
1012
1015
|
}
|
|
1013
1016
|
return tmp;
|
|
1014
1017
|
};
|
|
1015
|
-
protoOf(Logger).
|
|
1016
|
-
if (this.
|
|
1017
|
-
this.
|
|
1018
|
+
protoOf(Logger).x2n = function (tag, message, category) {
|
|
1019
|
+
if (this.l2n_1 && category.s2n_1) {
|
|
1020
|
+
this.k2n_1.u2n(generateTag(this, tag), message);
|
|
1018
1021
|
}
|
|
1019
1022
|
};
|
|
1020
|
-
protoOf(Logger).
|
|
1021
|
-
if (this.
|
|
1023
|
+
protoOf(Logger).z2n = function (tag, message, exception, category) {
|
|
1024
|
+
if (this.l2n_1 && category.s2n_1) {
|
|
1022
1025
|
if (exception == null)
|
|
1023
1026
|
null;
|
|
1024
1027
|
else {
|
|
1025
1028
|
printStackTrace(exception);
|
|
1026
1029
|
}
|
|
1027
|
-
this.
|
|
1030
|
+
this.k2n_1.v2n(generateTag(this, tag), generateMsg(message, exception), exception);
|
|
1028
1031
|
}
|
|
1029
1032
|
};
|
|
1030
|
-
protoOf(Logger).
|
|
1033
|
+
protoOf(Logger).o2n = function (tag, message, exception, category, $super) {
|
|
1031
1034
|
tag = tag === VOID ? null : tag;
|
|
1032
1035
|
message = message === VOID ? null : message;
|
|
1033
1036
|
exception = exception === VOID ? null : exception;
|
|
1034
1037
|
category = category === VOID ? Category_NONE_getInstance() : category;
|
|
1035
1038
|
var tmp;
|
|
1036
1039
|
if ($super === VOID) {
|
|
1037
|
-
this.
|
|
1040
|
+
this.z2n(tag, message, exception, category);
|
|
1038
1041
|
tmp = Unit_instance;
|
|
1039
1042
|
} else {
|
|
1040
|
-
tmp = $super.
|
|
1043
|
+
tmp = $super.z2n.call(this, tag, message, exception, category);
|
|
1041
1044
|
}
|
|
1042
1045
|
return tmp;
|
|
1043
1046
|
};
|
|
@@ -1051,7 +1054,7 @@
|
|
|
1051
1054
|
var logMessage = '';
|
|
1052
1055
|
// Inline function 'kotlin.text.isNullOrBlank' call
|
|
1053
1056
|
// Inline function 'kotlin.contracts.contract' call
|
|
1054
|
-
if (!(msg == null
|
|
1057
|
+
if (!(msg == null || isBlank(msg))) {
|
|
1055
1058
|
logMessage = logMessage + msg;
|
|
1056
1059
|
}
|
|
1057
1060
|
if (!(exception == null)) {
|
|
@@ -1066,25 +1069,27 @@
|
|
|
1066
1069
|
return logMessage;
|
|
1067
1070
|
}
|
|
1068
1071
|
function getLogTag(tag) {
|
|
1069
|
-
return tag == null ? '' :
|
|
1072
|
+
return !(tag == null) ? '[' + tag + ']' : '';
|
|
1070
1073
|
}
|
|
1071
1074
|
function PlatformLogger() {
|
|
1072
1075
|
}
|
|
1073
|
-
protoOf(PlatformLogger).
|
|
1076
|
+
protoOf(PlatformLogger).u2n = function (tag, msg) {
|
|
1074
1077
|
console.log(getLogTag(tag) + ': ' + msg);
|
|
1075
1078
|
};
|
|
1076
|
-
protoOf(PlatformLogger).
|
|
1079
|
+
protoOf(PlatformLogger).v2n = function (tag, msg, exception) {
|
|
1077
1080
|
if (!(exception == null)) {
|
|
1078
|
-
console.error(getLogTag(tag) + ': ' + msg + ', exception: ' + exception);
|
|
1081
|
+
console.error(getLogTag(tag) + ': ' + msg + ', exception: ' + toString_0(exception));
|
|
1079
1082
|
} else {
|
|
1080
1083
|
console.error(getLogTag(tag) + ': ' + msg);
|
|
1081
1084
|
}
|
|
1082
1085
|
};
|
|
1083
|
-
protoOf(PlatformLogger).
|
|
1084
|
-
|
|
1086
|
+
protoOf(PlatformLogger).w2n = function (tag, msg, exception) {
|
|
1087
|
+
var tmp = console;
|
|
1088
|
+
var tmp_0 = getLogTag(tag);
|
|
1089
|
+
tmp.warn(tmp_0 + ': ' + msg + ' ' + toString(exception == null ? '' : exception));
|
|
1085
1090
|
};
|
|
1086
1091
|
//region block: post-declaration
|
|
1087
|
-
protoOf(CombinationsCheckerProviderImpl).
|
|
1092
|
+
protoOf(CombinationsCheckerProviderImpl).u2m = findCardsInRowCombinations$default;
|
|
1088
1093
|
protoOf(CombinedRaspberryLogger).d = d;
|
|
1089
1094
|
protoOf(CombinedRaspberryLogger).e = e;
|
|
1090
1095
|
protoOf(CombinedRaspberryLogger).w = w;
|
|
@@ -1092,9 +1097,9 @@
|
|
|
1092
1097
|
protoOf(PlatformRaspberryLogger).e = e;
|
|
1093
1098
|
protoOf(PlatformRaspberryLogger).w = w;
|
|
1094
1099
|
defineProp(protoOf(PlatformRaspberryLogger), 'enabled', function () {
|
|
1095
|
-
return this.
|
|
1100
|
+
return this.i2n();
|
|
1096
1101
|
}, function (value) {
|
|
1097
|
-
this.
|
|
1102
|
+
this.h2n(value);
|
|
1098
1103
|
});
|
|
1099
1104
|
//endregion
|
|
1100
1105
|
//region block: init
|
|
@@ -1104,7 +1109,6 @@
|
|
|
1104
1109
|
Companion_instance = new Companion();
|
|
1105
1110
|
Companion_instance_0 = new Companion_0();
|
|
1106
1111
|
Companion_instance_2 = new Companion_2();
|
|
1107
|
-
Companion_instance_3 = new Companion_3();
|
|
1108
1112
|
//endregion
|
|
1109
1113
|
//region block: exports
|
|
1110
1114
|
function $jsExportAll$(_) {
|
|
@@ -1157,26 +1161,25 @@
|
|
|
1157
1161
|
_.$_$.m = CardNumberComparator_instance;
|
|
1158
1162
|
_.$_$.n = Companion_instance;
|
|
1159
1163
|
_.$_$.o = Companion_getInstance_1;
|
|
1160
|
-
_.$_$.p =
|
|
1161
|
-
_.$_$.q =
|
|
1162
|
-
_.$_$.r =
|
|
1163
|
-
_.$_$.s =
|
|
1164
|
-
_.$_$.t =
|
|
1165
|
-
_.$_$.u =
|
|
1166
|
-
_.$_$.v =
|
|
1167
|
-
_.$_$.w =
|
|
1168
|
-
_.$_$.x =
|
|
1169
|
-
_.$_$.y =
|
|
1170
|
-
_.$_$.z =
|
|
1171
|
-
_.$_$.a1 =
|
|
1172
|
-
_.$_$.b1 =
|
|
1173
|
-
_.$_$.c1 =
|
|
1174
|
-
_.$_$.d1 =
|
|
1175
|
-
_.$_$.e1 =
|
|
1176
|
-
_.$_$.f1 =
|
|
1177
|
-
_.$_$.g1 =
|
|
1178
|
-
_.$_$.h1 =
|
|
1179
|
-
_.$_$.i1 = RaspberryLogger;
|
|
1164
|
+
_.$_$.p = Logger_getInstance;
|
|
1165
|
+
_.$_$.q = Companion_instance_2;
|
|
1166
|
+
_.$_$.r = GameCard;
|
|
1167
|
+
_.$_$.s = get_entries;
|
|
1168
|
+
_.$_$.t = values;
|
|
1169
|
+
_.$_$.u = distributeCardsBottom;
|
|
1170
|
+
_.$_$.v = distributeCardsTop;
|
|
1171
|
+
_.$_$.w = filterByCardName;
|
|
1172
|
+
_.$_$.x = CardsDealerProvider;
|
|
1173
|
+
_.$_$.y = CombinationsCheckerProviderImpl;
|
|
1174
|
+
_.$_$.z = CombinationsCheckerProvider;
|
|
1175
|
+
_.$_$.a1 = DealerReducerImpl;
|
|
1176
|
+
_.$_$.b1 = DealerReducer;
|
|
1177
|
+
_.$_$.c1 = LoggerOutput;
|
|
1178
|
+
_.$_$.d1 = generateMsg;
|
|
1179
|
+
_.$_$.e1 = CombinedRaspberryLogger;
|
|
1180
|
+
_.$_$.f1 = LoggerEnabledTrigger;
|
|
1181
|
+
_.$_$.g1 = LoggerPayload;
|
|
1182
|
+
_.$_$.h1 = RaspberryLogger;
|
|
1180
1183
|
//endregion
|
|
1181
1184
|
return _;
|
|
1182
1185
|
}));
|