Prototype charity Truthtrance and coalition rule foundations
Verify and publish checkpoint container / container (push) Successful in 10m14s

This commit is contained in:
Quintine committed 2026-10-28 21:58:30 +11:00
1 parent e896570f07
commit cea310b030
17 files changed
+1024 -35

No files matched your search

+3 -3
View File
@@ -48,15 +48,15 @@ function validExtra(value: unknown): value is number {
value >= 0 && value <= MAX_VICTORY_EXTRA_STRONGHOLDS;
}
/** Normalize duplicates from the two rows representing one reciprocal alliance.
/** Normalize duplicate rows representing one qualifying alliance.
* Distinct sides must be disjoint and contain only actual seated players. */
function canonicalSides(order: readonly string[], sides: readonly (readonly string[])[]): string[][] {
requireContinuation(Array.isArray(sides), 'Retain the qualifying victory sides.');
const unique: string[][] = [];
for (const side of sides) {
requireContinuation(ids(side) && side.length >= 1 && side.length <= 2 &&
requireContinuation(ids(side) && side.length >= 1 && side.length <= 3 &&
new Set(side).size === side.length && side.every(player => order.includes(player)),
'Every qualifying side must contain one or two distinct seated players.');
'Every qualifying side must contain one through three distinct seated players.');
const members = order.filter(player => side.includes(player));
if (!unique.some(existing => same(existing, members))) unique.push(members);
}