client_plugin_logic_deb 1.8.426 → 1.8.427
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 +1 -1
- package/Logic_Debertz-engine.js +62 -95
- package/Logic_Debertz-engine.js.map +1 -1
- package/Logic_Debertz-game_client.js +1 -1
- package/kotlin-kotlin-stdlib.js +4 -4
- package/kotlinx-coroutines-core.js +7 -7
- package/kotlinx-coroutines-core.js.map +1 -1
- package/package.json +1 -1
package/Logic_Debertz-core.js
CHANGED
|
@@ -427,7 +427,7 @@
|
|
|
427
427
|
initMetadataForClass(AppEnvironmentValue, 'AppEnvironmentValue', VOID, Enum);
|
|
428
428
|
//endregion
|
|
429
429
|
function GameEngineConfig() {
|
|
430
|
-
this.version = '1.8.
|
|
430
|
+
this.version = '1.8.427';
|
|
431
431
|
}
|
|
432
432
|
protoOf(GameEngineConfig).g3z = function () {
|
|
433
433
|
return this.version;
|
package/Logic_Debertz-engine.js
CHANGED
|
@@ -50923,116 +50923,83 @@
|
|
|
50923
50923
|
return $super === VOID ? this.x9j(ratingList, playersMode, pointsMode, ratingConfig) : $super.x9j.call(this, ratingList, playersMode, pointsMode, ratingConfig);
|
|
50924
50924
|
};
|
|
50925
50925
|
protoOf(UserRatingInteractor).z9j = function (leavingPlayer, allPlayers, playersMode, pointsMode, ratingConfig) {
|
|
50926
|
-
|
|
50927
|
-
// Inline function 'kotlin.collections.
|
|
50928
|
-
|
|
50926
|
+
var maxScore = pointsMode.value;
|
|
50927
|
+
// Inline function 'kotlin.collections.filter' call
|
|
50928
|
+
// Inline function 'kotlin.collections.filterTo' call
|
|
50929
|
+
var destination = ArrayList_init_$Create$_0();
|
|
50929
50930
|
var _iterator__ex2g4s = allPlayers.l();
|
|
50930
50931
|
while (_iterator__ex2g4s.m()) {
|
|
50931
|
-
var
|
|
50932
|
-
|
|
50933
|
-
|
|
50934
|
-
if (item.l75_1.isBot) {
|
|
50935
|
-
tmp = AgentType_BOT_NATIVE_getInstance();
|
|
50936
|
-
} else if (isLeavingPlayer) {
|
|
50937
|
-
tmp = AgentType_BOT_REPLACEMENT_getInstance();
|
|
50938
|
-
} else {
|
|
50939
|
-
tmp = AgentType_HUMAN_getInstance();
|
|
50932
|
+
var element = _iterator__ex2g4s.n();
|
|
50933
|
+
if (!(element.playerId === leavingPlayer.playerId)) {
|
|
50934
|
+
destination.j(element);
|
|
50940
50935
|
}
|
|
50941
|
-
|
|
50942
|
-
|
|
50943
|
-
|
|
50944
|
-
|
|
50945
|
-
|
|
50946
|
-
|
|
50947
|
-
|
|
50948
|
-
|
|
50949
|
-
|
|
50950
|
-
|
|
50951
|
-
|
|
50952
|
-
|
|
50936
|
+
}
|
|
50937
|
+
// Inline function 'kotlin.collections.sortedByDescending' call
|
|
50938
|
+
// Inline function 'kotlin.comparisons.compareByDescending' call
|
|
50939
|
+
var tmp = UserRatingInteractor$calculatePlayerLeftRating$lambda;
|
|
50940
|
+
var tmp$ret$3 = new sam$kotlin_Comparator$0_9(tmp);
|
|
50941
|
+
var nonLeavingPlayers = sortedWith(destination, tmp$ret$3);
|
|
50942
|
+
var tmp_0;
|
|
50943
|
+
if (playersMode.q2_1 === 3) {
|
|
50944
|
+
// Inline function 'kotlin.collections.map' call
|
|
50945
|
+
var this_0 = take(nonLeavingPlayers, 2);
|
|
50946
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
50947
|
+
var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
50948
|
+
var _iterator__ex2g4s_0 = this_0.l();
|
|
50949
|
+
while (_iterator__ex2g4s_0.m()) {
|
|
50950
|
+
var item = _iterator__ex2g4s_0.n();
|
|
50951
|
+
var tmp$ret$5 = item.playerId;
|
|
50952
|
+
destination_0.j(tmp$ret$5);
|
|
50953
50953
|
}
|
|
50954
|
-
|
|
50955
|
-
|
|
50956
|
-
|
|
50957
|
-
|
|
50958
|
-
|
|
50959
|
-
|
|
50960
|
-
} else {
|
|
50961
|
-
// Inline function 'kotlin.collections.sortedByDescending' call
|
|
50962
|
-
// Inline function 'kotlin.comparisons.compareByDescending' call
|
|
50963
|
-
var tmp_2 = UserRatingInteractor$calculatePlayerLeftRating$lambda;
|
|
50964
|
-
var tmp$ret$3 = new sam$kotlin_Comparator$0_9(tmp_2);
|
|
50965
|
-
var sortedPlayers = sortedWith(allPlayers, tmp$ret$3);
|
|
50966
|
-
var tmp0 = take(sortedPlayers, 2);
|
|
50967
|
-
var tmp$ret$5;
|
|
50968
|
-
$l$block_0: {
|
|
50969
|
-
// Inline function 'kotlin.collections.any' call
|
|
50970
|
-
var tmp_3;
|
|
50971
|
-
if (isInterface(tmp0, Collection)) {
|
|
50972
|
-
tmp_3 = tmp0.q();
|
|
50973
|
-
} else {
|
|
50974
|
-
tmp_3 = false;
|
|
50975
|
-
}
|
|
50976
|
-
if (tmp_3) {
|
|
50977
|
-
tmp$ret$5 = false;
|
|
50978
|
-
break $l$block_0;
|
|
50979
|
-
}
|
|
50980
|
-
var _iterator__ex2g4s_0 = tmp0.l();
|
|
50981
|
-
while (_iterator__ex2g4s_0.m()) {
|
|
50982
|
-
var element = _iterator__ex2g4s_0.n();
|
|
50983
|
-
if (element.playerId === item.playerId) {
|
|
50984
|
-
tmp$ret$5 = true;
|
|
50985
|
-
break $l$block_0;
|
|
50986
|
-
}
|
|
50987
|
-
}
|
|
50988
|
-
tmp$ret$5 = false;
|
|
50989
|
-
}
|
|
50990
|
-
tmp_1 = tmp$ret$5;
|
|
50991
|
-
}
|
|
50992
|
-
tmp_0 = tmp_1;
|
|
50954
|
+
tmp_0 = toSet(destination_0);
|
|
50955
|
+
} else {
|
|
50956
|
+
var tmp_1;
|
|
50957
|
+
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
50958
|
+
if (!nonLeavingPlayers.q()) {
|
|
50959
|
+
tmp_1 = setOf(first(nonLeavingPlayers).playerId);
|
|
50993
50960
|
} else {
|
|
50994
|
-
|
|
50961
|
+
tmp_1 = emptySet();
|
|
50995
50962
|
}
|
|
50996
|
-
|
|
50997
|
-
|
|
50998
|
-
|
|
50999
|
-
|
|
50963
|
+
tmp_0 = tmp_1;
|
|
50964
|
+
}
|
|
50965
|
+
var winnerIds = tmp_0;
|
|
50966
|
+
// Inline function 'kotlin.collections.map' call
|
|
50967
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
50968
|
+
var destination_1 = ArrayList_init_$Create$(collectionSizeOrDefault(allPlayers, 10));
|
|
50969
|
+
var _iterator__ex2g4s_1 = allPlayers.l();
|
|
50970
|
+
while (_iterator__ex2g4s_1.m()) {
|
|
50971
|
+
var item_0 = _iterator__ex2g4s_1.n();
|
|
50972
|
+
var isLeavingPlayer = item_0.playerId === leavingPlayer.playerId;
|
|
50973
|
+
var isWinner = winnerIds.u1(item_0.playerId);
|
|
50974
|
+
var tmp_2;
|
|
50975
|
+
if (item_0.l75_1.isBot) {
|
|
50976
|
+
tmp_2 = AgentType_BOT_NATIVE_getInstance();
|
|
50977
|
+
} else if (isLeavingPlayer) {
|
|
50978
|
+
tmp_2 = AgentType_BOT_REPLACEMENT_getInstance();
|
|
51000
50979
|
} else {
|
|
51001
|
-
|
|
51002
|
-
if (maxCurrentPoints > 0) {
|
|
51003
|
-
tmp_5 = pointsMode.value / maxCurrentPoints;
|
|
51004
|
-
} else {
|
|
51005
|
-
tmp_5 = 1.0;
|
|
51006
|
-
}
|
|
51007
|
-
var scaleFactor = tmp_5;
|
|
51008
|
-
var tmp_6;
|
|
51009
|
-
if (currentPoints === maxCurrentPoints) {
|
|
51010
|
-
tmp_6 = pointsMode.value;
|
|
51011
|
-
} else {
|
|
51012
|
-
tmp_6 = numberToInt(currentPoints * scaleFactor);
|
|
51013
|
-
}
|
|
51014
|
-
tmp_4 = tmp_6;
|
|
50980
|
+
tmp_2 = AgentType_HUMAN_getInstance();
|
|
51015
50981
|
}
|
|
51016
|
-
var
|
|
51017
|
-
var
|
|
51018
|
-
|
|
50982
|
+
var agentType = tmp_2;
|
|
50983
|
+
var finalGamePoints = isLeavingPlayer ? 0 : isWinner ? maxScore : item_0.q75_1.d7c_1;
|
|
50984
|
+
var tmp$ret$9 = mapToRatingInput(item_0, isWinner, agentType, finalGamePoints);
|
|
50985
|
+
destination_1.j(tmp$ret$9);
|
|
51019
50986
|
}
|
|
51020
|
-
var ratingInputs =
|
|
50987
|
+
var ratingInputs = destination_1;
|
|
51021
50988
|
var results = this.x9j(ratingInputs, playersMode, pointsMode, ratingConfig);
|
|
51022
|
-
var tmp$ret$
|
|
51023
|
-
$l$
|
|
50989
|
+
var tmp$ret$13;
|
|
50990
|
+
$l$block: {
|
|
51024
50991
|
// Inline function 'kotlin.collections.firstOrNull' call
|
|
51025
|
-
var
|
|
51026
|
-
while (
|
|
51027
|
-
var element_0 =
|
|
50992
|
+
var _iterator__ex2g4s_2 = results.l();
|
|
50993
|
+
while (_iterator__ex2g4s_2.m()) {
|
|
50994
|
+
var element_0 = _iterator__ex2g4s_2.n();
|
|
51028
50995
|
if (element_0.t7h_1 === leavingPlayer.playerId) {
|
|
51029
|
-
tmp$ret$
|
|
51030
|
-
break $l$
|
|
50996
|
+
tmp$ret$13 = element_0;
|
|
50997
|
+
break $l$block;
|
|
51031
50998
|
}
|
|
51032
50999
|
}
|
|
51033
|
-
tmp$ret$
|
|
51000
|
+
tmp$ret$13 = null;
|
|
51034
51001
|
}
|
|
51035
|
-
return tmp$ret$
|
|
51002
|
+
return tmp$ret$13;
|
|
51036
51003
|
};
|
|
51037
51004
|
protoOf(UserRatingInteractor).a9k = function (leavingPlayer, allPlayers, playersMode, pointsMode, ratingConfig, $super) {
|
|
51038
51005
|
ratingConfig = ratingConfig === VOID ? new RatingConfig() : ratingConfig;
|