raspberry_games_server_game_logic 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.
|
@@ -380,7 +380,7 @@
|
|
|
380
380
|
function addFormatStructureForTime(structure) {
|
|
381
381
|
this.v5k(structure);
|
|
382
382
|
}
|
|
383
|
-
initMetadataForInterface(AbstractWithDateTimeBuilder, 'AbstractWithDateTimeBuilder', VOID, VOID, [AbstractWithDateBuilder, AbstractWithTimeBuilder,
|
|
383
|
+
initMetadataForInterface(AbstractWithDateTimeBuilder, 'AbstractWithDateTimeBuilder', VOID, VOID, [AbstractWithDateBuilder, AbstractWithTimeBuilder, WithTime, WithDate]);
|
|
384
384
|
initMetadataForClass(Builder_0, 'Builder', VOID, VOID, [AbstractDateTimeFormatBuilder, AbstractWithDateTimeBuilder]);
|
|
385
385
|
initMetadataForClass(LocalDateTimeFormat, 'LocalDateTimeFormat', VOID, AbstractDateTimeFormat);
|
|
386
386
|
function set_fractionOfSecond(value) {
|
package/Logic_Debertz-core.js
CHANGED
|
@@ -402,7 +402,7 @@
|
|
|
402
402
|
initMetadataForClass(AppEnvironmentValue, 'AppEnvironmentValue', VOID, Enum);
|
|
403
403
|
//endregion
|
|
404
404
|
function GameEngineConfig() {
|
|
405
|
-
this.version = '1.8.
|
|
405
|
+
this.version = '1.8.427';
|
|
406
406
|
}
|
|
407
407
|
protoOf(GameEngineConfig).a3w = function () {
|
|
408
408
|
return this.version;
|
package/Logic_Debertz-engine.js
CHANGED
|
@@ -45636,116 +45636,83 @@
|
|
|
45636
45636
|
return $super === VOID ? this.d8z(ratingList, playersMode, pointsMode, ratingConfig) : $super.d8z.call(this, ratingList, playersMode, pointsMode, ratingConfig);
|
|
45637
45637
|
};
|
|
45638
45638
|
protoOf(UserRatingInteractor).f8z = function (leavingPlayer, allPlayers, playersMode, pointsMode, ratingConfig) {
|
|
45639
|
-
|
|
45640
|
-
// Inline function 'kotlin.collections.
|
|
45641
|
-
|
|
45639
|
+
var maxScore = pointsMode.value;
|
|
45640
|
+
// Inline function 'kotlin.collections.filter' call
|
|
45641
|
+
// Inline function 'kotlin.collections.filterTo' call
|
|
45642
|
+
var destination = ArrayList_init_$Create$_0();
|
|
45642
45643
|
var _iterator__ex2g4s = allPlayers.l();
|
|
45643
45644
|
while (_iterator__ex2g4s.m()) {
|
|
45644
|
-
var
|
|
45645
|
-
|
|
45646
|
-
|
|
45647
|
-
if (item.j6v_1.isBot) {
|
|
45648
|
-
tmp = AgentType_BOT_NATIVE_getInstance();
|
|
45649
|
-
} else if (isLeavingPlayer) {
|
|
45650
|
-
tmp = AgentType_BOT_REPLACEMENT_getInstance();
|
|
45651
|
-
} else {
|
|
45652
|
-
tmp = AgentType_HUMAN_getInstance();
|
|
45645
|
+
var element = _iterator__ex2g4s.n();
|
|
45646
|
+
if (!(element.playerId === leavingPlayer.playerId)) {
|
|
45647
|
+
destination.j(element);
|
|
45653
45648
|
}
|
|
45654
|
-
|
|
45655
|
-
|
|
45656
|
-
|
|
45657
|
-
|
|
45658
|
-
|
|
45659
|
-
|
|
45660
|
-
|
|
45661
|
-
|
|
45662
|
-
|
|
45663
|
-
|
|
45664
|
-
|
|
45665
|
-
|
|
45649
|
+
}
|
|
45650
|
+
// Inline function 'kotlin.collections.sortedByDescending' call
|
|
45651
|
+
// Inline function 'kotlin.comparisons.compareByDescending' call
|
|
45652
|
+
var tmp = UserRatingInteractor$calculatePlayerLeftRating$lambda;
|
|
45653
|
+
var tmp$ret$3 = new sam$kotlin_Comparator$0_9(tmp);
|
|
45654
|
+
var nonLeavingPlayers = sortedWith(destination, tmp$ret$3);
|
|
45655
|
+
var tmp_0;
|
|
45656
|
+
if (playersMode.q2_1 === 3) {
|
|
45657
|
+
// Inline function 'kotlin.collections.map' call
|
|
45658
|
+
var this_0 = take(nonLeavingPlayers, 2);
|
|
45659
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
45660
|
+
var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
45661
|
+
var _iterator__ex2g4s_0 = this_0.l();
|
|
45662
|
+
while (_iterator__ex2g4s_0.m()) {
|
|
45663
|
+
var item = _iterator__ex2g4s_0.n();
|
|
45664
|
+
var tmp$ret$5 = item.playerId;
|
|
45665
|
+
destination_0.j(tmp$ret$5);
|
|
45666
45666
|
}
|
|
45667
|
-
|
|
45668
|
-
|
|
45669
|
-
|
|
45670
|
-
|
|
45671
|
-
|
|
45672
|
-
|
|
45673
|
-
} else {
|
|
45674
|
-
// Inline function 'kotlin.collections.sortedByDescending' call
|
|
45675
|
-
// Inline function 'kotlin.comparisons.compareByDescending' call
|
|
45676
|
-
var tmp_2 = UserRatingInteractor$calculatePlayerLeftRating$lambda;
|
|
45677
|
-
var tmp$ret$3 = new sam$kotlin_Comparator$0_9(tmp_2);
|
|
45678
|
-
var sortedPlayers = sortedWith(allPlayers, tmp$ret$3);
|
|
45679
|
-
var tmp0 = take(sortedPlayers, 2);
|
|
45680
|
-
var tmp$ret$5;
|
|
45681
|
-
$l$block_0: {
|
|
45682
|
-
// Inline function 'kotlin.collections.any' call
|
|
45683
|
-
var tmp_3;
|
|
45684
|
-
if (isInterface(tmp0, Collection)) {
|
|
45685
|
-
tmp_3 = tmp0.r();
|
|
45686
|
-
} else {
|
|
45687
|
-
tmp_3 = false;
|
|
45688
|
-
}
|
|
45689
|
-
if (tmp_3) {
|
|
45690
|
-
tmp$ret$5 = false;
|
|
45691
|
-
break $l$block_0;
|
|
45692
|
-
}
|
|
45693
|
-
var _iterator__ex2g4s_0 = tmp0.l();
|
|
45694
|
-
while (_iterator__ex2g4s_0.m()) {
|
|
45695
|
-
var element = _iterator__ex2g4s_0.n();
|
|
45696
|
-
if (element.playerId === item.playerId) {
|
|
45697
|
-
tmp$ret$5 = true;
|
|
45698
|
-
break $l$block_0;
|
|
45699
|
-
}
|
|
45700
|
-
}
|
|
45701
|
-
tmp$ret$5 = false;
|
|
45702
|
-
}
|
|
45703
|
-
tmp_1 = tmp$ret$5;
|
|
45704
|
-
}
|
|
45705
|
-
tmp_0 = tmp_1;
|
|
45667
|
+
tmp_0 = toSet(destination_0);
|
|
45668
|
+
} else {
|
|
45669
|
+
var tmp_1;
|
|
45670
|
+
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
45671
|
+
if (!nonLeavingPlayers.r()) {
|
|
45672
|
+
tmp_1 = setOf(first(nonLeavingPlayers).playerId);
|
|
45706
45673
|
} else {
|
|
45707
|
-
|
|
45674
|
+
tmp_1 = emptySet();
|
|
45708
45675
|
}
|
|
45709
|
-
|
|
45710
|
-
|
|
45711
|
-
|
|
45712
|
-
|
|
45676
|
+
tmp_0 = tmp_1;
|
|
45677
|
+
}
|
|
45678
|
+
var winnerIds = tmp_0;
|
|
45679
|
+
// Inline function 'kotlin.collections.map' call
|
|
45680
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
45681
|
+
var destination_1 = ArrayList_init_$Create$(collectionSizeOrDefault(allPlayers, 10));
|
|
45682
|
+
var _iterator__ex2g4s_1 = allPlayers.l();
|
|
45683
|
+
while (_iterator__ex2g4s_1.m()) {
|
|
45684
|
+
var item_0 = _iterator__ex2g4s_1.n();
|
|
45685
|
+
var isLeavingPlayer = item_0.playerId === leavingPlayer.playerId;
|
|
45686
|
+
var isWinner = winnerIds.u1(item_0.playerId);
|
|
45687
|
+
var tmp_2;
|
|
45688
|
+
if (item_0.j6v_1.isBot) {
|
|
45689
|
+
tmp_2 = AgentType_BOT_NATIVE_getInstance();
|
|
45690
|
+
} else if (isLeavingPlayer) {
|
|
45691
|
+
tmp_2 = AgentType_BOT_REPLACEMENT_getInstance();
|
|
45713
45692
|
} else {
|
|
45714
|
-
|
|
45715
|
-
if (maxCurrentPoints > 0) {
|
|
45716
|
-
tmp_5 = pointsMode.value / maxCurrentPoints;
|
|
45717
|
-
} else {
|
|
45718
|
-
tmp_5 = 1.0;
|
|
45719
|
-
}
|
|
45720
|
-
var scaleFactor = tmp_5;
|
|
45721
|
-
var tmp_6;
|
|
45722
|
-
if (currentPoints === maxCurrentPoints) {
|
|
45723
|
-
tmp_6 = pointsMode.value;
|
|
45724
|
-
} else {
|
|
45725
|
-
tmp_6 = numberToInt(currentPoints * scaleFactor);
|
|
45726
|
-
}
|
|
45727
|
-
tmp_4 = tmp_6;
|
|
45693
|
+
tmp_2 = AgentType_HUMAN_getInstance();
|
|
45728
45694
|
}
|
|
45729
|
-
var
|
|
45730
|
-
var
|
|
45731
|
-
|
|
45695
|
+
var agentType = tmp_2;
|
|
45696
|
+
var finalGamePoints = isLeavingPlayer ? 0 : isWinner ? maxScore : item_0.o6v_1.e71_1;
|
|
45697
|
+
var tmp$ret$9 = mapToRatingInput(item_0, isWinner, agentType, finalGamePoints);
|
|
45698
|
+
destination_1.j(tmp$ret$9);
|
|
45732
45699
|
}
|
|
45733
|
-
var ratingInputs =
|
|
45700
|
+
var ratingInputs = destination_1;
|
|
45734
45701
|
var results = this.d8z(ratingInputs, playersMode, pointsMode, ratingConfig);
|
|
45735
|
-
var tmp$ret$
|
|
45736
|
-
$l$
|
|
45702
|
+
var tmp$ret$13;
|
|
45703
|
+
$l$block: {
|
|
45737
45704
|
// Inline function 'kotlin.collections.firstOrNull' call
|
|
45738
|
-
var
|
|
45739
|
-
while (
|
|
45740
|
-
var element_0 =
|
|
45705
|
+
var _iterator__ex2g4s_2 = results.l();
|
|
45706
|
+
while (_iterator__ex2g4s_2.m()) {
|
|
45707
|
+
var element_0 = _iterator__ex2g4s_2.n();
|
|
45741
45708
|
if (element_0.u76_1 === leavingPlayer.playerId) {
|
|
45742
|
-
tmp$ret$
|
|
45743
|
-
break $l$
|
|
45709
|
+
tmp$ret$13 = element_0;
|
|
45710
|
+
break $l$block;
|
|
45744
45711
|
}
|
|
45745
45712
|
}
|
|
45746
|
-
tmp$ret$
|
|
45713
|
+
tmp$ret$13 = null;
|
|
45747
45714
|
}
|
|
45748
|
-
return tmp$ret$
|
|
45715
|
+
return tmp$ret$13;
|
|
45749
45716
|
};
|
|
45750
45717
|
protoOf(UserRatingInteractor).g8z = function (leavingPlayer, allPlayers, playersMode, pointsMode, ratingConfig, $super) {
|
|
45751
45718
|
ratingConfig = ratingConfig === VOID ? new RatingConfig() : ratingConfig;
|