Per-Sim leistung_pct: alle 14 Sims senden das eine Leistungs-% (0-100)
Jede Sim liefert jetzt selbst leistung_pct in GGS_LIVE_STATE UND im Submit (Fundament fuer das einheitliche %-System) — kein Rueckrechnen aus Sternen mehr, keine 0-3-Sonderfaelle. Formeln je Sim wie vereinbart: - klima/fluss/kofferdetektiv/heli: = vorhandener 0-100-score - weltkueche: richtige/(richtige+falsche)*100 (Fehler in %) - busfahrt/fluggesellschaft: topoPunkte/(Auftraege*3)*100 - farmer: gewichteter totalScore; energiemanager: ausgegl./gesamt -15/Blackout - eu-werkstatt: firstTry/Schritte -5/Muelleimer; sonnensystem: Erstversuch-Quote - tourismustal: Ziele+Zufriedenheit+Natur gewichtet; tourismusregion: gewichteter score - logistik: Kontostand->% (sendet erstmals eine Kennzahl, auch an /api/assessment) Teacher _leistungPct + live.php extractScore bevorzugen bereits diesen Wert. Additive Aenderungen, bestehende Logik/Sterne unveraendert; alle 15 Dateien syntaktisch geprueft. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -5030,6 +5030,11 @@ function showEnd() {
|
||||
firstTryHits: state.firstTryHits,
|
||||
totalAttempts: state.totalAttempts,
|
||||
muelleimerCount: state.muelleimerCount,
|
||||
// Einheitliche Leistungskennzahl (0–100): Anteil Auf-Anhieb-Treffer minus
|
||||
// 5 Punkte je Mülleimer-Wurf. Nenner 0 (keine Schritte) → 0.
|
||||
leistung_pct: stepsTotal > 0
|
||||
? Math.max(0, Math.min(100, Math.round(state.firstTryHits / stepsTotal * 100) - 5 * state.muelleimerCount))
|
||||
: 0,
|
||||
attemptsByStep: state.attemptsByStep,
|
||||
detoursByStep: state.detoursByStep,
|
||||
reshufflesByStep: state.reshufflesByStep,
|
||||
@@ -5295,6 +5300,12 @@ window.GGS_LIVE_STATE = function () {
|
||||
var reshufflesThisStep = (state.reshufflesByStep && state.reshufflesByStep[stepIdx]) || 0;
|
||||
var secondsElapsed = state.startedAt ? Math.round((Date.now() - state.startedAt) / 1000) : 0;
|
||||
|
||||
// Einheitliche Leistungskennzahl (0–100): Anteil Auf-Anhieb-Treffer minus
|
||||
// 5 Punkte je Mülleimer-Wurf. Nenner 0 (keine Schritte) → 0.
|
||||
var leistungPct = stepsTotal > 0
|
||||
? Math.max(0, Math.min(100, Math.round((state.firstTryHits || 0) / stepsTotal * 100) - 5 * (state.muelleimerCount || 0)))
|
||||
: 0;
|
||||
|
||||
// Health-Ampel (für die Lehrer-Live-Übersicht der nächsten Phase)
|
||||
var health = 'good';
|
||||
if (screen === 'play') {
|
||||
@@ -5332,6 +5343,7 @@ window.GGS_LIVE_STATE = function () {
|
||||
firstTryHits: state.firstTryHits || 0,
|
||||
totalAttempts: state.totalAttempts || 0,
|
||||
muelleimerCount: state.muelleimerCount || 0,
|
||||
leistung_pct: leistungPct,
|
||||
attemptsThisStep: attemptsThisStep,
|
||||
reshuffles: state.totalReshuffles || 0,
|
||||
reshufflesThisStep: reshufflesThisStep,
|
||||
|
||||
Reference in New Issue
Block a user