rm logs + caching
This commit is contained in:
@@ -132,13 +132,8 @@ function classifyGroups(states: Map<GroupId, GroupThirdState>): {
|
||||
// einer FERTIGEN Gruppe (played === 3), ob es in ALLEN noch möglichen
|
||||
// Restspiel-Konstellationen von maximal 7 anderen Dritten überholt werden kann.
|
||||
export function securelyQualifiedThirdTeams(matches: Match[], teams: Team[]): Set<string> {
|
||||
console.log("[3RD-DISPLAY] ThirdPlace ✓-haekchen = securelyQualifiedThirdTeams (team-level, zaehlt GD)",
|
||||
"| ThirdPlace GRUENER name = CSS .team-complete (played===3, KEIN Sicherheitsindikator)",
|
||||
"| Bracket fix = thirdSlotIsSecure -> classifyGroups -> lockedIn (group-level, NUR Punkte, KEIN GD)");
|
||||
console.log("[3RD-SOURCE] securelyQualifiedThirdTeams aufgerufen (teams)");
|
||||
const states = buildThirdStates(matches, teams);
|
||||
const secureTeams = new Set<string>();
|
||||
const { lockedIn } = classifyGroups(states);
|
||||
|
||||
for (const g of GROUP_IDS) {
|
||||
const st = states.get(g)!;
|
||||
@@ -159,30 +154,7 @@ export function securelyQualifiedThirdTeams(matches: Match[], teams: Team[]): Se
|
||||
}
|
||||
}
|
||||
|
||||
const team = teams.find(t => t.id === my.teamId);
|
||||
const isSecure = couldBeBetter <= 7;
|
||||
if (isSecure) secureTeams.add(my.teamId);
|
||||
|
||||
// Diagnose-Log für Iran und Grenzfälle
|
||||
const targetTeams = new Set(["IRN", "KOR", "ALG", "CRO"]); // Team-Codes
|
||||
if (team && targetTeams.has(team.code)) {
|
||||
console.log("[3RD-TEAM-SECURE]",
|
||||
"team:", team.name, "| group:", g,
|
||||
"| punkte:", my.points, "| gd:", my.goalDiff,
|
||||
"| couldBeBetter:", couldBeBetter,
|
||||
"| gruppe lockedIn:", lockedIn.has(g),
|
||||
"| als sicher markiert:", isSecure);
|
||||
}
|
||||
}
|
||||
|
||||
const iranTeam = teams.find(t => t.code === "IRN");
|
||||
if (iranTeam) {
|
||||
console.log("[3RD-IRAN-DISPLAY]",
|
||||
"secureTeams enthaelt Iran:", secureTeams.has(iranTeam.id),
|
||||
"| secureGroups (lockedIn) enthaelt G:", lockedIn.has("G"),
|
||||
"| haekchen gezeigt:", secureTeams.has(iranTeam.id) ? "ja" : "nein",
|
||||
"| name gruen (CSS team-complete, played===3):", "immer bei finished gruppe",
|
||||
"| im baum fix:", lockedIn.has("G") ? "ja (thirdSlotIsSecure via classifyGroups/POINTS)" : "nein");
|
||||
if (couldBeBetter <= 7) secureTeams.add(my.teamId);
|
||||
}
|
||||
|
||||
return secureTeams;
|
||||
@@ -191,19 +163,14 @@ export function securelyQualifiedThirdTeams(matches: Match[], teams: Team[]): Se
|
||||
// Liefert die Gruppen, deren Dritter mathematisch sicher unter den Top 8 ist.
|
||||
// (Gruppen-Ebene — für Fix-Markierung im Baum, nicht für Team-Häkchen.)
|
||||
export function securelyQualifiedThirdGroups(matches: Match[], teams: Team[]): GroupId[] {
|
||||
console.log("[3RD-SOURCE] securelyQualifiedThirdGroups aufgerufen (groups)");
|
||||
const states = buildThirdStates(matches, teams);
|
||||
const { lockedIn, lockedOut, contested } = classifyGroups(states);
|
||||
console.log("[3RD-CLASSIFY] lockedIn:", [...lockedIn].join(","),
|
||||
"| lockedOut:", [...lockedOut].join(","),
|
||||
"| contested:", [...contested].join(","));
|
||||
const { lockedIn } = classifyGroups(states);
|
||||
return [...lockedIn];
|
||||
}
|
||||
|
||||
// Prüft, ob ein bestimmter Dritten-Slot (Gegner des Siegers von `winnerGroup`)
|
||||
// in ALLEN noch möglichen Konstellationen identisch bleibt.
|
||||
export function thirdSlotIsSecure(winnerGroup: GroupId, matches: Match[], teams: Team[]): boolean {
|
||||
console.log("[3RD-SOURCE] thirdSlotIsSecure aufgerufen (slot-fix via classifyGroups)");
|
||||
const states = buildThirdStates(matches, teams);
|
||||
const { lockedIn, contested } = classifyGroups(states);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user