feat: Features pro Fuß und Variationen je Kategorie begrenzen
Schritt 7 der Mehrsaison-Reihe: Die Level-Features folgen jetzt den drei Zählregeln aus ISU 2788. - "In any spin with change of foot the maximum number of features attained on one foot is two (2)." Level-Berechnung deckelt pro Fuß; der Validator meldet zu viele Features auf einem Fuß und fehlende Fußangaben. - "In any spin only two (2) difficult variations are counted." Die Gruppe difficult_variation hat einen Deckel in den Daten (types.spin.groups). - "Any category of difficult spin variation in a basic position counts only once per program." Die Variation ist in fünf Kategorien aufgeteilt (Sitz, Camel, Layback, Upright, Sonstige); damit greift einmal-pro-Programm ohne Sonderlogik. Daten: `per_foot` je Feature, `max_features_per_foot` je Elementtyp, `change_of_foot` im Katalog (sechs Pirouetten mit Fußwechsel; CSp ist die Camel-Pirouette, nicht Change foot). Schema 9 speichert den Fuß als `element_feature_feet` (Code → L/R). Oberfläche: Die Fußauswahl erscheint nur, wenn sie das Ergebnis ändern kann – bei einer Fußwechsel-Pirouette mit mehr als zwei fußbezogenen Features. Angaben zu Level und Ausführung bleiben Selbsteinschätzung; das entscheidet weiterhin das technische Panel.
This commit is contained in:
parent
1a51debf6c
commit
31d4e70ba1
24 changed files with 944 additions and 170 deletions
|
|
@ -86,7 +86,7 @@ func _capture() -> void:
|
|||
elif args.size() > 3 and args[3] == "features":
|
||||
controller.select_segment(spin.segment_id)
|
||||
controller.set_selected_element_features(
|
||||
PackedStringArray(["difficult_variation", "difficult_exit"])
|
||||
PackedStringArray(["difficult_variation_sit", "difficult_exit"])
|
||||
)
|
||||
controller.element_button.pressed.emit()
|
||||
elif args.size() > 3 and args[3] == "validate":
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ func _init() -> void:
|
|||
_test_sequence_levels()
|
||||
_test_fixed_and_unlevelled_elements()
|
||||
_test_feature_validation()
|
||||
_test_foot_cap()
|
||||
_test_segment_features()
|
||||
_finish()
|
||||
|
||||
|
|
@ -42,8 +43,8 @@ func _test_rules_metadata() -> void:
|
|||
_check(_rules.source.contains("2788"), "level rules name ISU communication 2788")
|
||||
_check(_rules.valid_from == "2026-06-01", "level rules valid from 2026-06-01")
|
||||
_check(
|
||||
_rules.get_features(PathSegment.ElementType.SPIN).size() == 15,
|
||||
"spin rules contain 15 features"
|
||||
_rules.get_features(PathSegment.ElementType.SPIN).size() == 19,
|
||||
"spin rules contain 19 features (five variation categories)"
|
||||
)
|
||||
_check(
|
||||
_rules.get_features(PathSegment.ElementType.SEQUENCE).size() == 5,
|
||||
|
|
@ -56,11 +57,16 @@ func _test_rules_metadata() -> void:
|
|||
|
||||
var variation: ElementFeature = _rules.get_feature(
|
||||
PathSegment.ElementType.SPIN,
|
||||
"difficult_variation"
|
||||
"difficult_variation_sit"
|
||||
)
|
||||
_check(variation != null, "difficult variation exists")
|
||||
_check(variation.max_per_element == 2, "difficult variation counts twice")
|
||||
_check(not variation.once_per_program, "difficult variation is not once-only")
|
||||
_check(variation.max_per_element == 1, "a variation counts once per element")
|
||||
_check(variation.once_per_program, "a variation counts once per program")
|
||||
_check(variation.per_foot, "a variation is attained on one foot")
|
||||
_check(
|
||||
variation.group == "difficult_variation",
|
||||
"variations share a group"
|
||||
)
|
||||
var exit: ElementFeature = _rules.get_feature(
|
||||
PathSegment.ElementType.SPIN,
|
||||
"difficult_exit"
|
||||
|
|
@ -75,14 +81,14 @@ func _test_spin_levels() -> void:
|
|||
_check_level(
|
||||
spins,
|
||||
"CCoSp",
|
||||
PackedStringArray(["difficult_variation"]),
|
||||
PackedStringArray(["difficult_variation_sit"]),
|
||||
1,
|
||||
"one feature gives Level 1"
|
||||
)
|
||||
_check_level(
|
||||
spins,
|
||||
"CCoSp",
|
||||
PackedStringArray(["difficult_variation", "difficult_variation"]),
|
||||
PackedStringArray(["difficult_variation_sit", "difficult_variation_camel"]),
|
||||
2,
|
||||
"two difficult variations give Level 2"
|
||||
)
|
||||
|
|
@ -90,7 +96,7 @@ func _test_spin_levels() -> void:
|
|||
spins,
|
||||
"CCoSp",
|
||||
PackedStringArray(
|
||||
["difficult_variation", "difficult_variation", "difficult_variation"]
|
||||
["difficult_variation_sit", "difficult_variation_camel", "difficult_variation_layback"]
|
||||
),
|
||||
2,
|
||||
"a third difficult variation is ignored"
|
||||
|
|
@ -100,8 +106,7 @@ func _test_spin_levels() -> void:
|
|||
"CCoSp",
|
||||
PackedStringArray(
|
||||
[
|
||||
"difficult_variation",
|
||||
"difficult_variation",
|
||||
"difficult_variation_sit", "difficult_variation_camel",
|
||||
"difficult_exit",
|
||||
"change_of_edge",
|
||||
]
|
||||
|
|
@ -114,8 +119,7 @@ func _test_spin_levels() -> void:
|
|||
"CCoSp",
|
||||
PackedStringArray(
|
||||
[
|
||||
"difficult_variation",
|
||||
"difficult_variation",
|
||||
"difficult_variation_sit", "difficult_variation_camel",
|
||||
"change_foot_jump",
|
||||
"jump_in_spin",
|
||||
]
|
||||
|
|
@ -233,12 +237,82 @@ func _test_fixed_and_unlevelled_elements() -> void:
|
|||
)
|
||||
|
||||
|
||||
func _test_foot_cap() -> void:
|
||||
var spins := PathSegment.ElementType.SPIN
|
||||
var features := PackedStringArray(
|
||||
[
|
||||
"difficult_variation_sit",
|
||||
"difficult_variation_camel",
|
||||
"change_of_edge",
|
||||
]
|
||||
)
|
||||
|
||||
var one_foot := _rules.calculate_level(
|
||||
spins,
|
||||
"CCoSp",
|
||||
features,
|
||||
{
|
||||
"difficult_variation_sit": "L",
|
||||
"difficult_variation_camel": "L",
|
||||
"change_of_edge": "L",
|
||||
}
|
||||
)
|
||||
_check(
|
||||
one_foot.counted_features == 2,
|
||||
"only two features on one foot count (%d)" % one_foot.counted_features
|
||||
)
|
||||
_check(one_foot.level == 2, "the per-foot cap lowers the level")
|
||||
|
||||
var both_feet := _rules.calculate_level(
|
||||
spins,
|
||||
"CCoSp",
|
||||
features,
|
||||
{
|
||||
"difficult_variation_sit": "L",
|
||||
"difficult_variation_camel": "R",
|
||||
"change_of_edge": "R",
|
||||
}
|
||||
)
|
||||
_check(
|
||||
both_feet.counted_features == 3,
|
||||
"features on two feet all count (%d)" % both_feet.counted_features
|
||||
)
|
||||
_check(both_feet.level == 3, "three counted features give Level 3")
|
||||
|
||||
var unattributed := _rules.calculate_level(spins, "CCoSp", features, {})
|
||||
_check(
|
||||
unattributed.counted_features == 3,
|
||||
"unattributed features are not capped"
|
||||
)
|
||||
|
||||
var group := _rules.calculate_level(
|
||||
spins,
|
||||
"CCoSp",
|
||||
PackedStringArray(
|
||||
[
|
||||
"difficult_variation_sit",
|
||||
"difficult_variation_camel",
|
||||
"difficult_variation_layback",
|
||||
]
|
||||
),
|
||||
{
|
||||
"difficult_variation_sit": "L",
|
||||
"difficult_variation_camel": "R",
|
||||
"difficult_variation_layback": "L",
|
||||
}
|
||||
)
|
||||
_check(
|
||||
group.counted_features == 2,
|
||||
"at most two difficult variations count per spin"
|
||||
)
|
||||
|
||||
|
||||
func _test_feature_validation() -> void:
|
||||
var spins := PathSegment.ElementType.SPIN
|
||||
_check(
|
||||
_rules.validate_selection(
|
||||
spins,
|
||||
PackedStringArray(["difficult_variation", "difficult_exit"])
|
||||
PackedStringArray(["difficult_variation_sit", "difficult_exit"])
|
||||
).is_empty(),
|
||||
"a valid spin selection has no errors"
|
||||
)
|
||||
|
|
@ -254,10 +328,13 @@ func _test_feature_validation() -> void:
|
|||
_rules.validate_selection(
|
||||
spins,
|
||||
PackedStringArray(
|
||||
["difficult_variation", "difficult_variation", "difficult_variation"]
|
||||
[
|
||||
"difficult_variation_sit",
|
||||
"difficult_variation_sit",
|
||||
]
|
||||
)
|
||||
),
|
||||
"more than 2 time(s)"
|
||||
"more than 1 time(s)"
|
||||
),
|
||||
"over-limit repetitions are reported"
|
||||
)
|
||||
|
|
@ -294,7 +371,7 @@ func _test_segment_features() -> void:
|
|||
marker.curve = _make_point_curve(Vector2.ZERO)
|
||||
marker.set_element(PathSegment.ElementType.SPIN, "CCoSp", 4)
|
||||
marker.set_element_features(
|
||||
PackedStringArray(["difficult_variation", "difficult_variation", "difficult_exit"])
|
||||
PackedStringArray(["difficult_variation_sit", "difficult_variation_camel", "difficult_exit"])
|
||||
)
|
||||
_check(marker.element_features.size() == 3, "features are stored on the segment")
|
||||
_check(marker.is_valid(), "a segment with features is valid")
|
||||
|
|
|
|||
|
|
@ -57,12 +57,16 @@ func _test_clean_routine() -> void:
|
|||
4,
|
||||
PackedStringArray(
|
||||
[
|
||||
"difficult_variation",
|
||||
"difficult_variation",
|
||||
"difficult_variation_sit", "difficult_variation_camel",
|
||||
"difficult_exit",
|
||||
"change_of_edge",
|
||||
]
|
||||
)
|
||||
),
|
||||
{
|
||||
"difficult_variation_sit": "L",
|
||||
"difficult_variation_camel": "R",
|
||||
"change_of_edge": "R",
|
||||
}
|
||||
)
|
||||
_add_marker(
|
||||
section,
|
||||
|
|
@ -99,7 +103,7 @@ func _test_clean_routine() -> void:
|
|||
"the compulsory sequence feature was checked"
|
||||
)
|
||||
_check(report.get_check("level_features").passed == 2, "both derived levels match")
|
||||
_check(report.get_check("once").passed == 6, "once-per-program features were checked")
|
||||
_check(report.get_check("once").passed == 8, "once-per-program features were checked")
|
||||
_check_approx(
|
||||
report.base_value_total,
|
||||
8.30,
|
||||
|
|
@ -332,15 +336,23 @@ func _test_feature_selection() -> void:
|
|||
"CCoSp",
|
||||
0,
|
||||
PackedStringArray(
|
||||
["difficult_variation", "difficult_variation", "difficult_variation"]
|
||||
)
|
||||
["difficult_variation_sit", "difficult_variation_camel", "difficult_variation_layback"]
|
||||
),
|
||||
{
|
||||
"difficult_variation_sit": "L",
|
||||
"difficult_variation_camel": "R",
|
||||
"difficult_variation_layback": "L",
|
||||
}
|
||||
)
|
||||
var too_many := too_many_report.issues
|
||||
_check(
|
||||
_count(too_many, ValidationIssueScript.Severity.ERROR) == 1,
|
||||
"too many difficult variations is an error"
|
||||
_count(too_many, ValidationIssueScript.Severity.WARNING) == 1,
|
||||
"too many difficult variations is a warning (%s)" % _messages(too_many)
|
||||
)
|
||||
_check(
|
||||
_has_message(too_many, "höchstens 2 Features der Gruppe"),
|
||||
"the group limit is named"
|
||||
)
|
||||
_check(_has_message(too_many, "zu oft"), "over-limit feature message")
|
||||
|
||||
var missing_report := _report_one(
|
||||
PathSegment.ElementType.SEQUENCE,
|
||||
|
|
@ -369,7 +381,7 @@ func _test_level_mismatch() -> void:
|
|||
PathSegment.ElementType.SPIN,
|
||||
"CCoSp",
|
||||
4,
|
||||
PackedStringArray(["difficult_variation", "difficult_exit"])
|
||||
PackedStringArray(["difficult_variation_sit", "difficult_exit"])
|
||||
)
|
||||
var issues := report.issues
|
||||
_check(
|
||||
|
|
@ -483,10 +495,19 @@ func _report_one(
|
|||
type: PathSegment.ElementType,
|
||||
code: String,
|
||||
level: int,
|
||||
features: PackedStringArray
|
||||
features: PackedStringArray,
|
||||
feet: Dictionary = {}
|
||||
) -> ValidationReport:
|
||||
var routine := _make_routine()
|
||||
_add_marker(routine.sections[0], "segment", type, code, level, features)
|
||||
_add_marker(
|
||||
routine.sections[0],
|
||||
"segment",
|
||||
type,
|
||||
code,
|
||||
level,
|
||||
features,
|
||||
feet
|
||||
)
|
||||
return _validator.validate_report(routine)
|
||||
|
||||
|
||||
|
|
@ -509,7 +530,8 @@ func _add_marker(
|
|||
type: PathSegment.ElementType,
|
||||
code: String,
|
||||
level: int,
|
||||
features: PackedStringArray
|
||||
features: PackedStringArray,
|
||||
feet: Dictionary = {}
|
||||
) -> PathSegment:
|
||||
var segment: PathSegment = PathSegmentModel.new()
|
||||
segment.segment_id = segment_id
|
||||
|
|
@ -517,7 +539,7 @@ func _add_marker(
|
|||
curve.add_point(Vector2.ZERO)
|
||||
segment.curve = curve
|
||||
segment.set_element(type, code, level)
|
||||
segment.set_element_features(features)
|
||||
segment.set_element_features(features, feet)
|
||||
section.segments.append(segment)
|
||||
return segment
|
||||
|
||||
|
|
|
|||
|
|
@ -978,8 +978,7 @@ func _run() -> void:
|
|||
controller.set_selected_element_features(
|
||||
PackedStringArray(
|
||||
[
|
||||
"difficult_variation",
|
||||
"difficult_variation",
|
||||
"difficult_variation_sit", "difficult_variation_camel",
|
||||
"difficult_exit",
|
||||
"change_of_edge",
|
||||
]
|
||||
|
|
@ -1052,7 +1051,7 @@ func _run() -> void:
|
|||
_select_dialog_code(controller, "CCoSp")
|
||||
_check(
|
||||
controller.set_selected_element_features(
|
||||
PackedStringArray(["difficult_variation", "difficult_exit"])
|
||||
PackedStringArray(["difficult_variation_sit", "difficult_exit"])
|
||||
),
|
||||
"features update the derived level"
|
||||
)
|
||||
|
|
@ -1108,19 +1107,27 @@ func _run() -> void:
|
|||
"feature menu populates for a spin"
|
||||
)
|
||||
_check(
|
||||
controller.element_feature_menu.item_count == 18,
|
||||
"feature menu lists 15 features plus the second difficult variation"
|
||||
controller.element_feature_menu.item_count == 21,
|
||||
"feature menu lists 19 features plus separator and reset"
|
||||
)
|
||||
_check(
|
||||
controller.element_feature_menu.get_item_metadata(0) == "difficult_variation",
|
||||
controller.element_feature_menu.get_item_metadata(0) == "difficult_variation_sit",
|
||||
"feature menu items carry their feature code"
|
||||
)
|
||||
_check(
|
||||
controller.element_feature_menu.is_item_checked(0),
|
||||
"the selected difficult variation is checked"
|
||||
)
|
||||
var exit_index := -1
|
||||
for index: int in range(controller.element_feature_menu.item_count):
|
||||
if (
|
||||
str(controller.element_feature_menu.get_item_metadata(index))
|
||||
== "difficult_exit"
|
||||
):
|
||||
exit_index = index
|
||||
_check(
|
||||
controller.element_feature_menu.is_item_checked(6),
|
||||
exit_index >= 0
|
||||
and controller.element_feature_menu.is_item_checked(exit_index),
|
||||
"the selected difficult exit is checked"
|
||||
)
|
||||
controller.element_feature_menu.set_item_checked(1, false)
|
||||
|
|
@ -1222,7 +1229,7 @@ func _run() -> void:
|
|||
_check(spin.element_level == 0, "clearing features resets the level to Base")
|
||||
_check(
|
||||
controller.set_selected_element_features(
|
||||
PackedStringArray(["difficult_variation", "difficult_exit"])
|
||||
PackedStringArray(["difficult_variation_sit", "difficult_exit"])
|
||||
),
|
||||
"features restore Level 2"
|
||||
)
|
||||
|
|
@ -1837,7 +1844,45 @@ func _run() -> void:
|
|||
|
||||
controller.new_routine()
|
||||
|
||||
# Structured jump combination in the element dialog.
|
||||
# Fuß-Deckel: ab drei fußbezogenen Features fragt der Dialog nach dem Fuß.
|
||||
var spin_segment := controller.add_element_marker(
|
||||
Vector2(0.0, 0.0),
|
||||
PathSegment.ElementType.SPIN,
|
||||
"CCoSp",
|
||||
0
|
||||
)
|
||||
controller.select_segment(spin_segment.segment_id)
|
||||
_check(
|
||||
controller.set_selected_element_features(
|
||||
PackedStringArray(
|
||||
[
|
||||
"difficult_variation_sit",
|
||||
"difficult_variation_camel",
|
||||
"change_of_edge",
|
||||
]
|
||||
),
|
||||
{
|
||||
"difficult_variation_sit": "L",
|
||||
"difficult_variation_camel": "R",
|
||||
"change_of_edge": "R",
|
||||
}
|
||||
),
|
||||
"features with their foot are stored on the segment"
|
||||
)
|
||||
_check(
|
||||
spin_segment.element_feature_feet.size() == 3,
|
||||
"the foot of each feature is stored"
|
||||
)
|
||||
controller.element_button.pressed.emit()
|
||||
_check(
|
||||
controller.spin_foot_panel.visible,
|
||||
"the foot selector appears for three per-foot features"
|
||||
)
|
||||
_check(
|
||||
controller.spin_foot_panel.get_child_count() == 3,
|
||||
"one row per per-foot feature"
|
||||
)
|
||||
controller.element_dialog.hide()
|
||||
controller.new_routine()
|
||||
var combo_marker := controller.add_element_marker(
|
||||
Vector2(0.0, 0.0),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue