raspberry_games_server_game_logic 1.8.369 → 1.8.370
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/Logic_Debertz-core.js
CHANGED
|
@@ -379,7 +379,7 @@
|
|
|
379
379
|
initMetadataForClass(AppEnvironmentValue, 'AppEnvironmentValue', VOID, Enum);
|
|
380
380
|
//endregion
|
|
381
381
|
function GameEngineConfig() {
|
|
382
|
-
this.version = '1.8.
|
|
382
|
+
this.version = '1.8.370';
|
|
383
383
|
}
|
|
384
384
|
protoOf(GameEngineConfig).y3v = function () {
|
|
385
385
|
return this.version;
|
package/Logic_Debertz-engine.js
CHANGED
|
@@ -42708,7 +42708,7 @@
|
|
|
42708
42708
|
}
|
|
42709
42709
|
}
|
|
42710
42710
|
function clampAndRound($this, value, minUserRating, maxUserRating) {
|
|
42711
|
-
var upper =
|
|
42711
|
+
var upper = maxUserRating;
|
|
42712
42712
|
var clamped = coerceIn(value, minUserRating, upper);
|
|
42713
42713
|
// Inline function 'kotlin.math.pow' call
|
|
42714
42714
|
var factor = Math.pow(10.0, 2);
|
|
@@ -49997,6 +49997,54 @@
|
|
|
49997
49997
|
// Inline function 'com.logic.redux.store.definitions.middlewareForActionType' call
|
|
49998
49998
|
return new roundLifecycleMiddleware$$inlined$middlewareForActionType$1(scenePositionProvider, logger);
|
|
49999
49999
|
}
|
|
50000
|
+
function validateRatingChange(logger, playerAchievements) {
|
|
50001
|
+
var tmp;
|
|
50002
|
+
if (playerAchievements == null) {
|
|
50003
|
+
tmp = null;
|
|
50004
|
+
} else {
|
|
50005
|
+
// Inline function 'kotlin.collections.filter' call
|
|
50006
|
+
// Inline function 'kotlin.collections.filterTo' call
|
|
50007
|
+
var destination = ArrayList_init_$Create$_0();
|
|
50008
|
+
var _iterator__ex2g4s = playerAchievements.l();
|
|
50009
|
+
while (_iterator__ex2g4s.m()) {
|
|
50010
|
+
var element = _iterator__ex2g4s.n();
|
|
50011
|
+
// Inline function 'kotlin.math.absoluteValue' call
|
|
50012
|
+
var this_0 = element.oldRating - element.newRating;
|
|
50013
|
+
if (Math.abs(this_0) >= 80) {
|
|
50014
|
+
destination.j(element);
|
|
50015
|
+
}
|
|
50016
|
+
}
|
|
50017
|
+
tmp = destination;
|
|
50018
|
+
}
|
|
50019
|
+
var tmp1_elvis_lhs = tmp;
|
|
50020
|
+
var suspiciousRatingChange = tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs;
|
|
50021
|
+
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
50022
|
+
if (!suspiciousRatingChange.r()) {
|
|
50023
|
+
logger.w('roundLifecycleMiddleware', 'Suspicious rating change: ' + toString(suspiciousRatingChange));
|
|
50024
|
+
}
|
|
50025
|
+
var tmp_0;
|
|
50026
|
+
if (playerAchievements == null) {
|
|
50027
|
+
tmp_0 = null;
|
|
50028
|
+
} else {
|
|
50029
|
+
// Inline function 'kotlin.collections.filter' call
|
|
50030
|
+
// Inline function 'kotlin.collections.filterTo' call
|
|
50031
|
+
var destination_0 = ArrayList_init_$Create$_0();
|
|
50032
|
+
var _iterator__ex2g4s_0 = playerAchievements.l();
|
|
50033
|
+
while (_iterator__ex2g4s_0.m()) {
|
|
50034
|
+
var element_0 = _iterator__ex2g4s_0.n();
|
|
50035
|
+
if (element_0.oldRating < 2000 && element_0.newRating > 2000) {
|
|
50036
|
+
destination_0.j(element_0);
|
|
50037
|
+
}
|
|
50038
|
+
}
|
|
50039
|
+
tmp_0 = destination_0;
|
|
50040
|
+
}
|
|
50041
|
+
var tmp3_elvis_lhs = tmp_0;
|
|
50042
|
+
var ratingChangeAboveLimit = tmp3_elvis_lhs == null ? emptyList() : tmp3_elvis_lhs;
|
|
50043
|
+
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
50044
|
+
if (!ratingChangeAboveLimit.r()) {
|
|
50045
|
+
logger.w('roundLifecycleMiddleware', 'Rating change above limit: ' + toString(suspiciousRatingChange));
|
|
50046
|
+
}
|
|
50047
|
+
}
|
|
50000
50048
|
function roundLifecycleMiddleware$$inlined$middlewareForActionType$1($scenePositionProvider, $logger) {
|
|
50001
50049
|
this.v91_1 = $scenePositionProvider;
|
|
50002
50050
|
this.w91_1 = $logger;
|
|
@@ -50116,105 +50164,60 @@
|
|
|
50116
50164
|
tmp_3 = destination_2;
|
|
50117
50165
|
}
|
|
50118
50166
|
var playerAchievements = tmp_3;
|
|
50119
|
-
|
|
50120
|
-
|
|
50121
|
-
|
|
50122
|
-
|
|
50123
|
-
|
|
50124
|
-
|
|
50125
|
-
var destination_3 = ArrayList_init_$Create$_0();
|
|
50126
|
-
var _iterator__ex2g4s_3 = playerAchievements.l();
|
|
50127
|
-
while (_iterator__ex2g4s_3.m()) {
|
|
50128
|
-
var element_0 = _iterator__ex2g4s_3.n();
|
|
50129
|
-
// Inline function 'kotlin.math.absoluteValue' call
|
|
50130
|
-
var this_2 = element_0.oldRating - element_0.newRating;
|
|
50131
|
-
if (Math.abs(this_2) >= 60) {
|
|
50132
|
-
destination_3.j(element_0);
|
|
50133
|
-
}
|
|
50134
|
-
}
|
|
50135
|
-
tmp_4 = destination_3;
|
|
50136
|
-
}
|
|
50137
|
-
var tmp14_elvis_lhs = tmp_4;
|
|
50138
|
-
var suspiciousRatingChange = tmp14_elvis_lhs == null ? emptyList() : tmp14_elvis_lhs;
|
|
50139
|
-
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
50140
|
-
if (!suspiciousRatingChange.r()) {
|
|
50141
|
-
this.w91_1.w('roundLifecycleMiddleware', 'Suspicious rating change: ' + toString(suspiciousRatingChange));
|
|
50142
|
-
}
|
|
50167
|
+
validateRatingChange(this.w91_1, playerAchievements);
|
|
50168
|
+
var tmp_4 = store.dispatch;
|
|
50169
|
+
var tmp15_id = table_0.id;
|
|
50170
|
+
var tmp16_gameId = table_0.gameId;
|
|
50171
|
+
var tmp17_roundNumber = table_0.gameInfo.round.roundNumber;
|
|
50172
|
+
var tmp18_earnedBiggestPointPlayerId = sceneData.b79_1;
|
|
50143
50173
|
var tmp_5;
|
|
50144
|
-
if (playerAchievements == null) {
|
|
50145
|
-
tmp_5 = null;
|
|
50146
|
-
} else {
|
|
50147
|
-
// Inline function 'kotlin.collections.filter' call
|
|
50148
|
-
// Inline function 'kotlin.collections.filterTo' call
|
|
50149
|
-
var destination_4 = ArrayList_init_$Create$_0();
|
|
50150
|
-
var _iterator__ex2g4s_4 = playerAchievements.l();
|
|
50151
|
-
while (_iterator__ex2g4s_4.m()) {
|
|
50152
|
-
var element_1 = _iterator__ex2g4s_4.n();
|
|
50153
|
-
if (element_1.oldRating < 2000 && element_1.newRating > 2000) {
|
|
50154
|
-
destination_4.j(element_1);
|
|
50155
|
-
}
|
|
50156
|
-
}
|
|
50157
|
-
tmp_5 = destination_4;
|
|
50158
|
-
}
|
|
50159
|
-
var tmp16_elvis_lhs = tmp_5;
|
|
50160
|
-
var ratingChangeAboveLimit = tmp16_elvis_lhs == null ? emptyList() : tmp16_elvis_lhs;
|
|
50161
|
-
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
50162
|
-
if (!ratingChangeAboveLimit.r()) {
|
|
50163
|
-
this.w91_1.w('roundLifecycleMiddleware', 'Rating change above limit: ' + toString(suspiciousRatingChange));
|
|
50164
|
-
}
|
|
50165
|
-
var tmp_6 = store.dispatch;
|
|
50166
|
-
var tmp19_id = table_0.id;
|
|
50167
|
-
var tmp20_gameId = table_0.gameId;
|
|
50168
|
-
var tmp21_roundNumber = table_0.gameInfo.round.roundNumber;
|
|
50169
|
-
var tmp22_earnedBiggestPointPlayerId = sceneData.b79_1;
|
|
50170
|
-
var tmp_7;
|
|
50171
50174
|
if (gameWinners == null) {
|
|
50172
|
-
|
|
50175
|
+
tmp_5 = null;
|
|
50173
50176
|
} else {
|
|
50174
50177
|
// Inline function 'kotlin.collections.toTypedArray' call
|
|
50175
|
-
|
|
50178
|
+
tmp_5 = copyToArray(gameWinners);
|
|
50176
50179
|
}
|
|
50177
|
-
var
|
|
50178
|
-
var
|
|
50180
|
+
var tmp19_gameWinners = tmp_5;
|
|
50181
|
+
var tmp_6;
|
|
50179
50182
|
if (isGameFinished) {
|
|
50180
50183
|
// Inline function 'kotlin.collections.map' call
|
|
50181
|
-
var
|
|
50184
|
+
var this_2 = table_0.players;
|
|
50182
50185
|
// Inline function 'kotlin.collections.mapTo' call
|
|
50183
|
-
var
|
|
50184
|
-
var
|
|
50185
|
-
while (
|
|
50186
|
-
var item_2 =
|
|
50187
|
-
var tmp$ret$
|
|
50188
|
-
|
|
50186
|
+
var destination_3 = ArrayList_init_$Create$(collectionSizeOrDefault(this_2, 10));
|
|
50187
|
+
var _iterator__ex2g4s_3 = this_2.l();
|
|
50188
|
+
while (_iterator__ex2g4s_3.m()) {
|
|
50189
|
+
var item_2 = _iterator__ex2g4s_3.n();
|
|
50190
|
+
var tmp$ret$23 = mapToGameAnalytics(item_2, table_0.gameDuration);
|
|
50191
|
+
destination_3.j(tmp$ret$23);
|
|
50189
50192
|
}
|
|
50190
50193
|
// Inline function 'kotlin.collections.toTypedArray' call
|
|
50191
|
-
|
|
50194
|
+
tmp_6 = copyToArray(destination_3);
|
|
50192
50195
|
} else {
|
|
50193
|
-
|
|
50196
|
+
tmp_6 = null;
|
|
50194
50197
|
}
|
|
50195
|
-
var
|
|
50198
|
+
var tmp20_playersGameAnalytics = tmp_6;
|
|
50196
50199
|
// Inline function 'kotlin.collections.map' call
|
|
50197
|
-
var
|
|
50200
|
+
var this_3 = table_0.players;
|
|
50198
50201
|
// Inline function 'kotlin.collections.mapTo' call
|
|
50199
|
-
var
|
|
50200
|
-
var
|
|
50201
|
-
while (
|
|
50202
|
-
var item_3 =
|
|
50203
|
-
var tmp$ret$
|
|
50204
|
-
|
|
50202
|
+
var destination_4 = ArrayList_init_$Create$(collectionSizeOrDefault(this_3, 10));
|
|
50203
|
+
var _iterator__ex2g4s_4 = this_3.l();
|
|
50204
|
+
while (_iterator__ex2g4s_4.m()) {
|
|
50205
|
+
var item_3 = _iterator__ex2g4s_4.n();
|
|
50206
|
+
var tmp$ret$27 = mapToRoundAnalytics(item_3, table_0.gameDuration);
|
|
50207
|
+
destination_4.j(tmp$ret$27);
|
|
50205
50208
|
}
|
|
50206
50209
|
// Inline function 'kotlin.collections.toTypedArray' call
|
|
50207
|
-
var
|
|
50208
|
-
var
|
|
50209
|
-
var
|
|
50210
|
+
var tmp21_playersRoundAnalytics = copyToArray(destination_4);
|
|
50211
|
+
var tmp22_gameHistory = table_0.gameHistory;
|
|
50212
|
+
var tmp_7;
|
|
50210
50213
|
if (playerAchievements == null) {
|
|
50211
|
-
|
|
50214
|
+
tmp_7 = null;
|
|
50212
50215
|
} else {
|
|
50213
50216
|
// Inline function 'kotlin.collections.toTypedArray' call
|
|
50214
|
-
|
|
50217
|
+
tmp_7 = copyToArray(playerAchievements);
|
|
50215
50218
|
}
|
|
50216
|
-
var
|
|
50217
|
-
|
|
50219
|
+
var tmp23_achievements = tmp_7;
|
|
50220
|
+
tmp_4(new RoundEndedAction(tmp15_id, tmp16_gameId, tmp17_roundNumber, tmp18_earnedBiggestPointPlayerId, gameLosers, tmp19_gameWinners, tmp20_playersGameAnalytics, tmp21_playersRoundAnalytics, tmp23_achievements, tmp22_gameHistory));
|
|
50218
50221
|
}
|
|
50219
50222
|
}
|
|
50220
50223
|
}
|
|
@@ -54745,7 +54748,7 @@
|
|
|
54745
54748
|
var tmp3_bribes = emptyList();
|
|
54746
54749
|
var tmp4_gameInfo = roundFinishedGameInfoReducer(this, table);
|
|
54747
54750
|
var tmp5_gameHistory = this.a9a_1.v99(table.gameHistory);
|
|
54748
|
-
return table.copy(VOID, VOID, VOID, VOID, destination, VOID, tmp0_sceneInfo, tmp2_cardsOnTable, tmp3_bribes,
|
|
54751
|
+
return table.copy(VOID, VOID, VOID, VOID, destination, VOID, tmp0_sceneInfo, tmp2_cardsOnTable, tmp3_bribes, VOID, VOID, tmp4_gameInfo, tmp5_gameHistory);
|
|
54749
54752
|
};
|
|
54750
54753
|
protoOf(TableLifecycleReducerImpl).p99 = function (table) {
|
|
54751
54754
|
// Inline function 'kotlin.collections.map' call
|