feat: Dauer-, Wiederholungs- und Kombinationspruefung

- Kategorie-Dauer gegen Sollzeit plus Toleranz
- Sprungwiederholungen max. 2-mal inkl. Kombinationsbestandteilen
- Kombinations-/Folgenanzahl und max. Sprunge pro Kombination
- Punktschaetzung mit PCS-Annahme und Sturzabzug
- Inline-Panel fuer PCS-Durchschnitt und Stuerze, mit Kuer gespeichert
- 67 Adult- und 279 Whiteboard-Assertions (1023 gesamt)
- Doku und Roadmap aktualisiert
This commit is contained in:
torsten 2026-10-31 11:34:45 +01:00
parent e4fd74ea6e
commit ef1a01d5b3
13 changed files with 476 additions and 66 deletions

View file

@ -94,6 +94,10 @@ func _capture() -> void:
elif args.size() > 3 and args[3] == "adultgold":
controller.set_adult_category("gold")
controller.open_validation_dialog()
elif args.size() > 3 and args[3] == "assumptions":
controller.set_adult_category("gold")
controller.open_validation_dialog()
controller.validation_text.meta_clicked.emit("score_assumptions")
elif args.size() > 3 and args[3] == "scoreinfo":
controller.open_validation_dialog()
controller.validation_text.meta_clicked.emit("score_info")

View file

@ -32,6 +32,7 @@ func _init() -> void:
_test_jump_permissions()
_test_gold_limits()
_test_valid_gold()
_test_duration_and_repetitions()
_test_unknown_category()
_finish()
@ -153,6 +154,7 @@ func _test_valid_gold() -> void:
_add_spin(section, "spin-b", "FUSp", 3)
_add_spin(section, "spin-chsp", "ChSp", 1)
_add_sequence(section, "step", "StSq", 2)
_set_total_duration(section, 170.0)
var report := _validator.validate_report(routine)
_check(report.issues.is_empty(), "a valid Gold program has no findings")
@ -176,6 +178,35 @@ func _test_valid_gold() -> void:
report.get_check("category_required").passed == 1,
"the Gold required elements pass"
)
_check(
report.get_check("category_duration").passed == 1,
"the Gold duration passes at 2:50"
)
func _test_duration_and_repetitions() -> void:
var routine := _make_routine("gold")
var section := routine.sections[0]
for code: String in ["2T", "2T", "2T", "2S+2S", "2Lo+2Lo", "2T+2T"]:
_add_jump(section, code)
_set_total_duration(section, 200.0)
var report := _validator.validate_report(routine)
_check(
report.get_check("category_repetitions").warnings == 1,
"more than two 2T attempts are reported"
)
_check(
report.get_check("category_combinations").warnings == 1,
"three jump combinations exceed the Gold limit"
)
_check(
report.get_check("category_duration").warnings == 1,
"200 seconds are outside the Gold duration"
)
_check(_has_message(report, "kommt 5-mal vor"), "repetition message")
_check(_has_message(report, "Sprungkombinationen: 3"), "combination message")
_check(_has_message(report, "Kürdauer"), "duration message")
func _test_unknown_category() -> void:
@ -236,6 +267,14 @@ func _add_sequence(
return segment
func _set_total_duration(section: RoutineSection, total: float) -> void:
if section.segments.is_empty():
return
var each := total / float(section.segments.size())
for segment: PathSegment in section.segments:
segment.element_duration_seconds = each
func _make_point_curve(point: Vector2) -> Curve2D:
var curve := Curve2D.new()
curve.add_point(point)

View file

@ -1368,6 +1368,33 @@ func _run() -> void:
controller.validation_text.text.contains("Choreographic Spin"),
"validation dialog reports the missing choreographic spin"
)
_check(
controller.validation_text.text.contains("Punktschätzung")
and controller.validation_text.text.contains("Geschätzte Summe"),
"Gold validation shows the PCS-based estimate"
)
controller.validation_text.meta_clicked.emit("score_assumptions")
_check(
controller.score_assumptions_panel.visible,
"the assumptions panel opens from the score estimate"
)
controller.pcs_average_spin.value = 6.0
controller.falls_spin.value = 1.0
controller.apply_score_assumptions_button.pressed.emit()
_check(
not controller.score_assumptions_panel.visible,
"applying the assumptions closes the inline panel"
)
_check(
controller.get_routine().assumed_pcs_average == 6.0
and controller.get_routine().assumed_falls == 1,
"the scoring assumptions are stored on the routine"
)
_check(
controller.validation_text.text.contains("PCS-Annahme: 6,00")
and controller.validation_text.text.contains("-1,00"),
"the estimate follows the changed assumptions"
)
controller.validation_dialog.hide()
scene.queue_free()