Balancing: sonnensystem (Erst-Treffer-Bewertung, Loesung nicht aufdecken, Level-Badge) + energiemanager (echter Blackout an Netzfrequenz, Schwierigkeitsrampe)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -252,6 +252,13 @@ class Benchmark
|
||||
*/
|
||||
private static function scoreSonnensystem(array $r): ?int
|
||||
{
|
||||
// Neue Bewertung = Erst-Treffer-Quote (Meisterschaft auf Anhieb, 0–100).
|
||||
// Nur „alle gelöst" ergibt nicht mehr automatisch 100 %.
|
||||
$firstTryQuote = $r['firstTryQuote'] ?? null;
|
||||
if (is_numeric($firstTryQuote)) {
|
||||
return (int)round(max(0, min(100, (float)$firstTryQuote)));
|
||||
}
|
||||
// Fallback für Alt-Datensätze ohne Erst-Treffer-Feld.
|
||||
$completed = $r['completed'] ?? null;
|
||||
$total = $r['total'] ?? null;
|
||||
$firstTry = $r['firstTry'] ?? null;
|
||||
|
||||
Reference in New Issue
Block a user