Datasets:
Download contracts/small/equal_slice/rules.json from KRAFTON/A2Z-GameSpec-Bench: direct link, hf CLI and curl.
- Browser
- Download file 83.3 kB
-
https://huggingface.co/datasets/KRAFTON/A2Z-GameSpec-Bench/resolve/main/contracts/small/equal_slice/rules.json
- Command line
-
hf download hf://datasets/KRAFTON/A2Z-GameSpec-Bench/contracts/small/equal_slice/rules.json
-
curl -L -o rules.json https://huggingface.co/datasets/KRAFTON/A2Z-GameSpec-Bench/resolve/main/contracts/small/equal_slice/rules.json
83.3 kB
| [ | |
| { | |
| "id": "SES-R1", | |
| "label": "Initialize a new game session", | |
| "preconditions": [], | |
| "trigger": { | |
| "type": "Event", | |
| "name": "SessionStart" | |
| }, | |
| "effects": [ | |
| { | |
| "type": "StateUpdate", | |
| "entity": "GameSession", | |
| "attribute": "committedLineCount", | |
| "operator": "SET", | |
| "value": 0 | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "ActiveTime", | |
| "attribute": "activeTime", | |
| "operator": "SET", | |
| "value": 0 | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "LastClockWallTime", | |
| "attribute": "lastClockWallTime", | |
| "operator": "SET", | |
| "value": { | |
| "expr": "current wallTime" | |
| } | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "GameSession", | |
| "attribute": "attemptStartActiveTime", | |
| "operator": "SET", | |
| "value": null | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "GameSession", | |
| "attribute": "feedbackStartActiveTime", | |
| "operator": "SET", | |
| "value": null | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "PausedRemaining", | |
| "attribute": "pausedRemaining", | |
| "operator": "SET", | |
| "value": null | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "PausedSubstate", | |
| "attribute": "pausedSubstate", | |
| "operator": "SET", | |
| "value": null | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "TransitionSource", | |
| "attribute": "transitionSource", | |
| "operator": "SET", | |
| "value": { | |
| "expr": "state immediately before transition" | |
| } | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "GameSession", | |
| "attribute": "transitionTargetShapeIndex", | |
| "operator": "SET", | |
| "value": 1 | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "State", | |
| "attribute": "state", | |
| "operator": "SET", | |
| "value": "Transition" | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "TransitionPhase", | |
| "attribute": "transitionPhase", | |
| "operator": "SET", | |
| "value": "SourceFade" | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "GameSession", | |
| "attribute": "transitionPhaseStartWallTime", | |
| "operator": "SET", | |
| "value": { | |
| "expr": "current wallTime" | |
| } | |
| } | |
| ], | |
| "provenance": { | |
| "mechanic": "SES-R1", | |
| "gdd_quote": "| `SES-R1` | `START-R6`–`START-R9` or `SES-R10` emits `sessionStart` | Set `committedLineCount=0`, `activeTime=0`, `lastClockWallTime=current wallTime`, both active start times and pause fields to `null`, `transitionSource=state immediately before transition`, `transitionTargetShapeIndex=1`, `state=TRANSITION`, `transitionPhase=SOURCE_FADE`, and `transitionPhaseStartWallTime=current wallTime`. When retrying from the results, preserve the attempts array, `sessionAverage`, and `shapeIndex` so the fading result rows, average, and final shape can be drawn, and do not start the input timer. |", | |
| "precondition": "`START-R6`–`START-R9` or `SES-R10` emits `sessionStart`", | |
| "action": "Apply SES-R1 under the stated condition and trigger.", | |
| "expected": "Set `committedLineCount=0`, `activeTime=0`, `lastClockWallTime=current wallTime`, both active start times and pause fields to `null`, `transitionSource=state immediately before transition`, `transitionTargetShapeIndex=1`, `state=TRANSITION`, `transitionPhase=SOURCE_FADE`, and `transitionPhaseStartWallTime=current wallTime`. When retrying from the results, preserve the attempts array, `sessionAverage`, and `shapeIndex` so the fading result rows, average, and final shape can be drawn, and do not start the input timer.", | |
| "evidence": "Observe the state updates and emitted events specified by SES-R1.", | |
| "source": { | |
| "file": "gdds/small/equal_slice.md", | |
| "line_start": 55, | |
| "line_end": 55, | |
| "quote": "| `SES-R1` | `START-R6`–`START-R9` or `SES-R10` emits `sessionStart` | Set `committedLineCount=0`, `activeTime=0`, `lastClockWallTime=current wallTime`, both active start times and pause fields to `null`, `transitionSource=state immediately before transition`, `transitionTargetShapeIndex=1`, `state=TRANSITION`, `transitionPhase=SOURCE_FADE`, and `transitionPhaseStartWallTime=current wallTime`. When retrying from the results, preserve the attempts array, `sessionAverage`, and `shapeIndex` so the fading result rows, average, and final shape can be drawn, and do not start the input timer. |" | |
| } | |
| } | |
| }, | |
| { | |
| "id": "SES-R2", | |
| "label": "Enter feedback after a valid split", | |
| "preconditions": [ | |
| { | |
| "type": "StatePredicate", | |
| "entity": "State", | |
| "attribute": "state", | |
| "operator": "==", | |
| "value": "Input" | |
| } | |
| ], | |
| "trigger": { | |
| "type": "Event", | |
| "name": "ValidSplitCommitted" | |
| }, | |
| "effects": [ | |
| { | |
| "type": "StateUpdate", | |
| "entity": "GameSession", | |
| "attribute": "attempts", | |
| "operator": "SET", | |
| "value": { | |
| "kind": "opaque", | |
| "description": "the valid split result of the current shape recorded at attempts[shapeIndex-1], without overwriting earlier indices or creating empty indices" | |
| } | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "State", | |
| "attribute": "state", | |
| "operator": "SET", | |
| "value": "Feedback" | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "RemainingFeedback", | |
| "attribute": "remainingFeedback", | |
| "operator": "SET", | |
| "value": "DBT-05" | |
| }, | |
| { | |
| "type": "EventEmission", | |
| "name": "InputMusicFadeOutStarted" | |
| }, | |
| { | |
| "type": "EventEmission", | |
| "name": "FeedbackMusicStarted" | |
| } | |
| ], | |
| "provenance": { | |
| "mechanic": "SES-R2", | |
| "gdd_quote": "| `SES-R2` | `INPUT`, `CUT-R7` | Record the valid split result in the current attempt, set `state=FEEDBACK`, and start the feedback timer. Display `JDG-R1` or `JDG-R2`. |", | |
| "precondition": "`INPUT`, `CUT-R7`", | |
| "action": "Apply SES-R2 under the stated condition and trigger.", | |
| "expected": "Record the valid split result in the current attempt, set `state=FEEDBACK`, and start the feedback timer. Display `JDG-R1` or `JDG-R2`. On entry, fade out `MUS-INPUT` over 80 ms and start `MUS-FEEDBACK`. Does not cover the gain of `MUS-FEEDBACK` during the 80 ms crossfade.", | |
| "evidence": "Observe the state updates and emitted events specified by SES-R2.", | |
| "source": { | |
| "file": "gdds/small/equal_slice.md", | |
| "line_start": 56, | |
| "line_end": 56, | |
| "quote": "| `SES-R2` | `INPUT`, `CUT-R7` | Record the valid split result in the current attempt, set `state=FEEDBACK`, and start the feedback timer. Display `JDG-R1` or `JDG-R2`. |" | |
| } | |
| } | |
| }, | |
| { | |
| "id": "SES-R3", | |
| "label": "Enter feedback after a non-split", | |
| "preconditions": [ | |
| { | |
| "type": "StatePredicate", | |
| "entity": "State", | |
| "attribute": "state", | |
| "operator": "==", | |
| "value": "Input" | |
| } | |
| ], | |
| "trigger": { | |
| "type": "Event", | |
| "name": "NonSplitCommitted" | |
| }, | |
| "effects": [ | |
| { | |
| "type": "StateUpdate", | |
| "entity": "GameSession", | |
| "attribute": "attempts", | |
| "operator": "SET", | |
| "value": { | |
| "kind": "opaque", | |
| "description": "the non-split result of the current shape recorded at attempts[shapeIndex-1], without overwriting earlier indices or creating empty indices" | |
| } | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "State", | |
| "attribute": "state", | |
| "operator": "SET", | |
| "value": "Feedback" | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "RemainingFeedback", | |
| "attribute": "remainingFeedback", | |
| "operator": "SET", | |
| "value": "DBT-05" | |
| }, | |
| { | |
| "type": "EventEmission", | |
| "name": "InputMusicFadeOutStarted" | |
| }, | |
| { | |
| "type": "EventEmission", | |
| "name": "FeedbackMusicStarted" | |
| } | |
| ], | |
| "provenance": { | |
| "mechanic": "SES-R3", | |
| "gdd_quote": "| `SES-R3` | `INPUT`, `CUT-R8` | Record the non-split result in the current attempt, set `state=FEEDBACK`, and start the feedback timer. Display `JDG-R3`. |", | |
| "precondition": "`INPUT`, `CUT-R8`", | |
| "action": "Apply SES-R3 under the stated condition and trigger.", | |
| "expected": "Record the non-split result in the current attempt, set `state=FEEDBACK`, and start the feedback timer. Display `JDG-R3`. On entry, fade out `MUS-INPUT` over 80 ms and start `MUS-FEEDBACK`. Does not cover the gain of `MUS-FEEDBACK` during the 80 ms crossfade.", | |
| "evidence": "Observe the state updates and emitted events specified by SES-R3.", | |
| "source": { | |
| "file": "gdds/small/equal_slice.md", | |
| "line_start": 57, | |
| "line_end": 57, | |
| "quote": "| `SES-R3` | `INPUT`, `CUT-R8` | Record the non-split result in the current attempt, set `state=FEEDBACK`, and start the feedback timer. Display `JDG-R3`. |" | |
| } | |
| } | |
| }, | |
| { | |
| "id": "SES-R4", | |
| "label": "Enter feedback after timeout", | |
| "preconditions": [ | |
| { | |
| "type": "StatePredicate", | |
| "entity": "State", | |
| "attribute": "state", | |
| "operator": "==", | |
| "value": "Input" | |
| } | |
| ], | |
| "trigger": { | |
| "type": "Event", | |
| "name": "TimeoutRecorded" | |
| }, | |
| "effects": [ | |
| { | |
| "type": "StateUpdate", | |
| "entity": "GameSession", | |
| "attribute": "attempts", | |
| "operator": "SET", | |
| "value": { | |
| "kind": "opaque", | |
| "description": "the timeout result of the current shape recorded at attempts[shapeIndex-1], without overwriting earlier indices or creating empty indices" | |
| } | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "State", | |
| "attribute": "state", | |
| "operator": "SET", | |
| "value": "Feedback" | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "RemainingFeedback", | |
| "attribute": "remainingFeedback", | |
| "operator": "SET", | |
| "value": "DBT-05" | |
| }, | |
| { | |
| "type": "EventEmission", | |
| "name": "InputMusicFadeOutStarted" | |
| }, | |
| { | |
| "type": "EventEmission", | |
| "name": "FeedbackMusicStarted" | |
| } | |
| ], | |
| "provenance": { | |
| "mechanic": "SES-R4", | |
| "gdd_quote": "| `SES-R4` | `INPUT`, one of `CUT-R4`, `CUT-R6`, `CUT-R9` | Record the timeout result in the current attempt, set `state=FEEDBACK`, and start the feedback timer. Display `JDG-R4`. |", | |
| "precondition": "`INPUT`, one of `CUT-R4`, `CUT-R6`, `CUT-R9`", | |
| "action": "Apply SES-R4 under the stated condition and trigger.", | |
| "expected": "Record the timeout result in the current attempt, set `state=FEEDBACK`, and start the feedback timer. Display `JDG-R4`. On entry, fade out `MUS-INPUT` over 80 ms and start `MUS-FEEDBACK`. Does not cover the gain of `MUS-FEEDBACK` during the 80 ms crossfade.", | |
| "evidence": "Observe the state updates and emitted events specified by SES-R4.", | |
| "source": { | |
| "file": "gdds/small/equal_slice.md", | |
| "line_start": 58, | |
| "line_end": 58, | |
| "quote": "| `SES-R4` | `INPUT`, one of `CUT-R4`, `CUT-R6`, `CUT-R9` | Record the timeout result in the current attempt, set `state=FEEDBACK`, and start the feedback timer. Display `JDG-R4`. |" | |
| } | |
| } | |
| }, | |
| { | |
| "id": "SES-R5", | |
| "label": "Transition to the next shape after feedback", | |
| "preconditions": [ | |
| { | |
| "type": "StatePredicate", | |
| "entity": "RemainingFeedback", | |
| "attribute": "remainingFeedback", | |
| "operator": "==", | |
| "value": 0 | |
| }, | |
| { | |
| "type": "StatePredicate", | |
| "entity": "RemainingFeedback", | |
| "attribute": "remainingFeedback", | |
| "operator": "==", | |
| "value": { | |
| "kind": "opaque", | |
| "description": "the expiration is reached on a frame with no pause request at the same time. If a pause (SES-R7) is at the same time as the expiration, SES-R7 comes first, the screen is preserved and the expiration is processed on the resume frame" | |
| } | |
| }, | |
| { | |
| "type": "StatePredicate", | |
| "entity": "ShapeIndex", | |
| "attribute": "shapeIndex", | |
| "operator": "<", | |
| "value": "DBT-03" | |
| }, | |
| { | |
| "type": "StatePredicate", | |
| "entity": "State", | |
| "attribute": "state", | |
| "operator": "==", | |
| "value": "Feedback" | |
| } | |
| ], | |
| "trigger": { | |
| "type": "Event", | |
| "name": "FeedbackTimerExpired" | |
| }, | |
| "effects": [ | |
| { | |
| "type": "StateUpdate", | |
| "entity": "TransitionSource", | |
| "attribute": "transitionSource", | |
| "operator": "SET", | |
| "value": "Feedback" | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "GameSession", | |
| "attribute": "transitionTargetShapeIndex", | |
| "operator": "SET", | |
| "value": { | |
| "kind": "expr", | |
| "op": "+", | |
| "operands": [ | |
| { | |
| "kind": "ref", | |
| "entity": "ShapeIndex", | |
| "attribute": "shapeIndex" | |
| }, | |
| 1 | |
| ] | |
| } | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "State", | |
| "attribute": "state", | |
| "operator": "SET", | |
| "value": "Transition" | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "TransitionPhase", | |
| "attribute": "transitionPhase", | |
| "operator": "SET", | |
| "value": "SourceFade" | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "GameSession", | |
| "attribute": "transitionPhaseStartWallTime", | |
| "operator": "SET", | |
| "value": { | |
| "expr": "current wallTime" | |
| } | |
| } | |
| ], | |
| "provenance": { | |
| "mechanic": "SES-R5", | |
| "gdd_quote": "| `SES-R5` | `FEEDBACK`, feedback time has ended and `shapeIndex < DBT-03` | Set `transitionSource=FEEDBACK`, `transitionTargetShapeIndex=shapeIndex+1`, `state=TRANSITION`, `transitionPhase=SOURCE_FADE`, and `transitionPhaseStartWallTime=current wallTime`, then begin fading out the previous shape. Do not change `shapeIndex` or the input timer yet. |", | |
| "precondition": "`FEEDBACK`, feedback time has ended and `shapeIndex < DBT-03`", | |
| "action": "Apply SES-R5 under the stated condition and trigger.", | |
| "expected": "Set `transitionSource=FEEDBACK`, `transitionTargetShapeIndex=shapeIndex+1`, `state=TRANSITION`, `transitionPhase=SOURCE_FADE`, and `transitionPhaseStartWallTime=current wallTime`, then begin fading out the previous shape. Do not change `shapeIndex` or the input timer yet. If pause is at the same time as expiration, `SES-R7` comes first, preserving the screen and processing expiration on the resume frame.", | |
| "evidence": "Observe the state updates and emitted events specified by SES-R5.", | |
| "source": { | |
| "file": "gdds/small/equal_slice.md", | |
| "line_start": 59, | |
| "line_end": 59, | |
| "quote": "| `SES-R5` | `FEEDBACK`, feedback time has ended and `shapeIndex < DBT-03` | Set `transitionSource=FEEDBACK`, `transitionTargetShapeIndex=shapeIndex+1`, `state=TRANSITION`, `transitionPhase=SOURCE_FADE`, and `transitionPhaseStartWallTime=current wallTime`, then begin fading out the previous shape. Do not change `shapeIndex` or the input timer yet. |" | |
| } | |
| } | |
| }, | |
| { | |
| "id": "SES-R6", | |
| "label": "Show results after the final shape", | |
| "preconditions": [ | |
| { | |
| "type": "StatePredicate", | |
| "entity": "RemainingFeedback", | |
| "attribute": "remainingFeedback", | |
| "operator": "==", | |
| "value": 0 | |
| }, | |
| { | |
| "type": "StatePredicate", | |
| "entity": "RemainingFeedback", | |
| "attribute": "remainingFeedback", | |
| "operator": "==", | |
| "value": { | |
| "kind": "opaque", | |
| "description": "the expiration is reached on a frame with no pause request at the same time. If a pause (SES-R7) is at the same time as the expiration, SES-R7 comes first, the screen is preserved and the expiration is processed on the resume frame" | |
| } | |
| }, | |
| { | |
| "type": "StatePredicate", | |
| "entity": "ShapeIndex", | |
| "attribute": "shapeIndex", | |
| "operator": "==", | |
| "value": "DBT-03" | |
| }, | |
| { | |
| "type": "StatePredicate", | |
| "entity": "State", | |
| "attribute": "state", | |
| "operator": "==", | |
| "value": "Feedback" | |
| } | |
| ], | |
| "trigger": { | |
| "type": "Event", | |
| "name": "FeedbackTimerExpired" | |
| }, | |
| "effects": [ | |
| { | |
| "type": "StateUpdate", | |
| "entity": "GameSession", | |
| "attribute": "average", | |
| "operator": "SET", | |
| "value": { | |
| "expr": "session average after SYS-SCORE display rounding" | |
| } | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "State", | |
| "attribute": "state", | |
| "operator": "SET", | |
| "value": "Result" | |
| }, | |
| { | |
| "type": "EventEmission", | |
| "name": "ResultMusicFadeInStarted" | |
| } | |
| ], | |
| "provenance": { | |
| "mechanic": "SES-R6", | |
| "gdd_quote": "| `SES-R6` | `FEEDBACK`, feedback time has ended and `shapeIndex = DBT-03` | Set `state=RESULT`; store the session average after `SYS-SCORE` display rounding in `sessionAverage` and display `SCR-RESULT`. |", | |
| "precondition": "`FEEDBACK`, feedback time has ended and `shapeIndex = DBT-03`", | |
| "action": "Apply SES-R6 under the stated condition and trigger.", | |
| "expected": "Set `state=RESULT`; store the session average after `SYS-SCORE` display rounding in `sessionAverage` and display `SCR-RESULT`. If pause is at the same time as expiration, `SES-R7` comes first, preserving the screen and processing expiration on the resume frame. On entry, fade in `MUS-RESULT` over 200 ms. Fade in over `DBT-24` after the final feedback.", | |
| "evidence": "Observe the state updates and emitted events specified by SES-R6.", | |
| "source": { | |
| "file": "gdds/small/equal_slice.md", | |
| "line_start": 60, | |
| "line_end": 60, | |
| "quote": "| `SES-R6` | `FEEDBACK`, feedback time has ended and `shapeIndex = DBT-03` | Set `state=RESULT`; store the session average after `SYS-SCORE` display rounding in `sessionAverage` and display `SCR-RESULT`. |" | |
| } | |
| } | |
| }, | |
| { | |
| "id": "SES-R7", | |
| "label": "Pause active input or feedback", | |
| "preconditions": [ | |
| { | |
| "type": "StatePredicate", | |
| "entity": "State", | |
| "attribute": "state", | |
| "operator": "IN", | |
| "value": [ | |
| "Input", | |
| "Feedback" | |
| ] | |
| } | |
| ], | |
| "trigger": { | |
| "type": "Event", | |
| "name": "PauseRequestOrVisibilityFocusOrPointerCaptureLost" | |
| }, | |
| "effects": [ | |
| { | |
| "type": "StateUpdate", | |
| "entity": "CutLine", | |
| "attribute": "preview", | |
| "operator": "SET", | |
| "value": null | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "PausedRemaining", | |
| "attribute": "pausedRemaining", | |
| "operator": "SET", | |
| "value": { | |
| "expr": "remaining time" | |
| } | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "PausedSubstate", | |
| "attribute": "pausedSubstate", | |
| "operator": "SET", | |
| "value": { | |
| "expr": "current substate" | |
| } | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "State", | |
| "attribute": "state", | |
| "operator": "SET", | |
| "value": "Pause" | |
| }, | |
| { | |
| "type": "EventEmission", | |
| "name": "PauseSoundPlayed" | |
| }, | |
| { | |
| "type": "EventEmission", | |
| "name": "PauseMusicFilterApplied" | |
| } | |
| ], | |
| "provenance": { | |
| "mechanic": "SES-R7", | |
| "gdd_quote": "| `SES-R7` | `INPUT` or `FEEDBACK`, pause request or `document.visibilityState=\"hidden\"` | Discard the active drag and set `state=PAUSE` while preserving the current substate and remaining time; display `SCR-PAUSE`. |", | |
| "precondition": "`INPUT` or `FEEDBACK`, pause request or `document.visibilityState=\"hidden\"`", | |
| "action": "Apply SES-R7 under the stated condition and trigger.", | |
| "expected": "Discard the active drag and set `state=PAUSE` while preserving the current substate and remaining time; display `SCR-PAUSE`. Losing focus during play triggers `SES-R7`. Handle loss of pointer capture, browser `blur`, and `document.visibilityState=\"hidden\"` through `SES-R7` in `INPUT` and `FEEDBACK`. On entry, play `SFX-PAUSE`, a low 100 ms felt impact, reduce the current music by -9 dB over `DBT-21`, and apply an 800 Hz low-pass filter. Apply over `DBT-21` and restore over `DBT-21` when resuming. The music playback head stops and resumes from the same position.", | |
| "evidence": "Observe the state updates and emitted events specified by SES-R7.", | |
| "source": { | |
| "file": "gdds/small/equal_slice.md", | |
| "line_start": 61, | |
| "line_end": 61, | |
| "quote": "| `SES-R7` | `INPUT` or `FEEDBACK`, pause request or `document.visibilityState=\"hidden\"` | Discard the active drag and set `state=PAUSE` while preserving the current substate and remaining time; display `SCR-PAUSE`. |" | |
| } | |
| } | |
| }, | |
| { | |
| "id": "SES-R8", | |
| "label": "Resume the preserved substate", | |
| "preconditions": [ | |
| { | |
| "type": "StatePredicate", | |
| "entity": "State", | |
| "attribute": "state", | |
| "operator": "==", | |
| "value": "Pause" | |
| } | |
| ], | |
| "trigger": { | |
| "type": "Event", | |
| "name": "ContinueConfirmedOrCancelInput" | |
| }, | |
| "effects": [ | |
| { | |
| "type": "StateUpdate", | |
| "entity": "RemainingInput", | |
| "attribute": "remainingInput", | |
| "operator": "SET", | |
| "value": { | |
| "kind": "opaque", | |
| "description": "pausedRemaining when pausedSubstate is INPUT: the input start time becomes activeTime-(DBT-04-pausedRemaining) with DBT-04 = 8.0 s, based on the current activeTime; unchanged when pausedSubstate is FEEDBACK" | |
| } | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "RemainingFeedback", | |
| "attribute": "remainingFeedback", | |
| "operator": "SET", | |
| "value": { | |
| "kind": "opaque", | |
| "description": "pausedRemaining when pausedSubstate is FEEDBACK: the feedback start time becomes activeTime-(DBT-05-pausedRemaining) with DBT-05 = 2.0 s, based on the current activeTime; unchanged when pausedSubstate is INPUT" | |
| } | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "State", | |
| "attribute": "state", | |
| "operator": "SET", | |
| "value": { | |
| "expr": "preserved substate" | |
| } | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "PausedSubstate", | |
| "attribute": "pausedSubstate", | |
| "operator": "SET", | |
| "value": null | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "PausedRemaining", | |
| "attribute": "pausedRemaining", | |
| "operator": "SET", | |
| "value": null | |
| }, | |
| { | |
| "type": "EventEmission", | |
| "name": "ResumeSoundPlayed" | |
| }, | |
| { | |
| "type": "EventEmission", | |
| "name": "PauseMusicFilterRestored" | |
| } | |
| ], | |
| "provenance": { | |
| "mechanic": "SES-R8", | |
| "gdd_quote": "| `SES-R8` | `PAUSE`, Continue confirmed | Return to the preserved substate and remaining time. A new drag must begin again from a button press. |", | |
| "precondition": "`PAUSE`, Continue confirmed", | |
| "action": "Apply SES-R8 under the stated condition and trigger.", | |
| "expected": "Return to the preserved substate and remaining time. A new drag must begin again from a button press. `IN-CANCEL` uses `SES-R8`; confirming Continue uses `SES-R8`; confirming Title uses `SES-R9`. Continue restores the filter and volume over `DBT-21` with `SFX-RESUME`, a 90 ms reverse air tick. When returning to `INPUT` through `SES-R8`, resume from the paused playback head. Apply over `DBT-21` and restore over `DBT-21` when resuming. The music playback head stops and resumes from the same position.", | |
| "evidence": "Observe the state updates and emitted events specified by SES-R8.", | |
| "source": { | |
| "file": "gdds/small/equal_slice.md", | |
| "line_start": 62, | |
| "line_end": 62, | |
| "quote": "| `SES-R8` | `PAUSE`, Continue confirmed | Return to the preserved substate and remaining time. A new drag must begin again from a button press. |" | |
| } | |
| } | |
| }, | |
| { | |
| "id": "SES-R9", | |
| "label": "Return from pause to title", | |
| "preconditions": [ | |
| { | |
| "type": "StatePredicate", | |
| "entity": "State", | |
| "attribute": "state", | |
| "operator": "==", | |
| "value": "Pause" | |
| } | |
| ], | |
| "trigger": { | |
| "type": "Event", | |
| "name": "TitleConfirmed" | |
| }, | |
| "effects": [ | |
| { | |
| "type": "StateUpdate", | |
| "entity": "GameSession", | |
| "attribute": "attempts", | |
| "operator": "SET", | |
| "value": { | |
| "kind": "opaque", | |
| "description": "the current session data is discarded from memory together with its recorded attempts; nothing is saved" | |
| } | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "State", | |
| "attribute": "state", | |
| "operator": "SET", | |
| "value": "Title" | |
| }, | |
| { | |
| "type": "EventEmission", | |
| "name": "CancelSoundPlayed" | |
| }, | |
| { | |
| "type": "EventEmission", | |
| "name": "TitleMusicCrossfadeStarted" | |
| } | |
| ], | |
| "provenance": { | |
| "mechanic": "SES-R9", | |
| "gdd_quote": "| `SES-R9` | `PAUSE`, Title confirmed | Discard the current session data and set `state=TITLE`; display `SCR-TITLE`. |", | |
| "precondition": "`PAUSE`, Title confirmed", | |
| "action": "Apply SES-R9 under the stated condition and trigger.", | |
| "expected": "Discard the current session data and set `state=TITLE`; display `SCR-TITLE`. Going to the title plays `SFX-UI-CANCEL`, then resumes the paused current-music head from the same position while retaining the pause filter and -9 dB gain, fades it to 0, and performs a `DBT-24` crossfade that raises the title music.", | |
| "evidence": "Observe the state updates and emitted events specified by SES-R9.", | |
| "source": { | |
| "file": "gdds/small/equal_slice.md", | |
| "line_start": 63, | |
| "line_end": 63, | |
| "quote": "| `SES-R9` | `PAUSE`, Title confirmed | Discard the current session data and set `state=TITLE`; display `SCR-TITLE`. |" | |
| } | |
| } | |
| }, | |
| { | |
| "id": "SES-R11", | |
| "label": "Return from results to title", | |
| "preconditions": [ | |
| { | |
| "type": "StatePredicate", | |
| "entity": "State", | |
| "attribute": "state", | |
| "operator": "==", | |
| "value": "Result" | |
| } | |
| ], | |
| "trigger": { | |
| "type": "Event", | |
| "name": "TitleConfirmedOrCancelInput" | |
| }, | |
| "effects": [ | |
| { | |
| "type": "StateUpdate", | |
| "entity": "GameSession", | |
| "attribute": "attempts", | |
| "operator": "SET", | |
| "value": { | |
| "kind": "opaque", | |
| "description": "the result data is discarded from memory: the three recorded attempts are removed and nothing is saved" | |
| } | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "GameSession", | |
| "attribute": "average", | |
| "operator": "SET", | |
| "value": null | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "State", | |
| "attribute": "state", | |
| "operator": "SET", | |
| "value": "Title" | |
| }, | |
| { | |
| "type": "EventEmission", | |
| "name": "CancelSoundPlayed" | |
| }, | |
| { | |
| "type": "EventEmission", | |
| "name": "TitleMusicCrossfadeStarted" | |
| } | |
| ], | |
| "provenance": { | |
| "mechanic": "SES-R11", | |
| "gdd_quote": "| `SES-R11` | `RESULT`, Title confirmed | Discard the result data from memory and set `state=TITLE`; display `SCR-TITLE`. |", | |
| "precondition": "`RESULT`, Title confirmed", | |
| "action": "Apply SES-R11 under the stated condition and trigger.", | |
| "expected": "Discard the result data from memory and set `state=TITLE`; display `SCR-TITLE`. Confirming Retry uses `SES-R10`; confirming Title and `IN-CANCEL` use `SES-R11`. Pause · Results | Title | Title | Over 160 ms, linearly transition the source panel's opacity from 1→0 and the title panel and decorative outline from 0→1 simultaneously | Crossfade to `MUS-TITLE` over `DBT-24`.", | |
| "evidence": "Observe the state updates and emitted events specified by SES-R11.", | |
| "source": { | |
| "file": "gdds/small/equal_slice.md", | |
| "line_start": 65, | |
| "line_end": 65, | |
| "quote": "| `SES-R11` | `RESULT`, Title confirmed | Discard the result data from memory and set `state=TITLE`; display `SCR-TITLE`. |" | |
| } | |
| } | |
| }, | |
| { | |
| "id": "SES-R14", | |
| "label": "Advance transition from source fade to shape reveal", | |
| "preconditions": [ | |
| { | |
| "type": "StatePredicate", | |
| "entity": "State", | |
| "attribute": "state", | |
| "operator": "==", | |
| "value": "Transition" | |
| }, | |
| { | |
| "type": "StatePredicate", | |
| "entity": "TransitionPhase", | |
| "attribute": "transitionPhase", | |
| "operator": "==", | |
| "value": "SourceFade" | |
| } | |
| ], | |
| "trigger": { | |
| "type": "Event", | |
| "name": "SourceFadeCompleted" | |
| }, | |
| "effects": [ | |
| { | |
| "type": "StateUpdate", | |
| "entity": "GameSession", | |
| "attribute": "attempts", | |
| "operator": "SET", | |
| "value": { | |
| "kind": "opaque", | |
| "description": "attempts cleared when transitionTargetShapeIndex equals 1; otherwise preserved" | |
| } | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "GameSession", | |
| "attribute": "average", | |
| "operator": "SET", | |
| "value": { | |
| "kind": "opaque", | |
| "description": "null when transitionTargetShapeIndex equals 1; otherwise preserved" | |
| } | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "ShapeIndex", | |
| "attribute": "shapeIndex", | |
| "operator": "SET", | |
| "value": { | |
| "expr": "transitionTargetShapeIndex" | |
| } | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "GameSession", | |
| "attribute": "committedLineCount", | |
| "operator": "SET", | |
| "value": 0 | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "TransitionPhase", | |
| "attribute": "transitionPhase", | |
| "operator": "SET", | |
| "value": "ShapeReveal" | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "GameSession", | |
| "attribute": "transitionPhaseStartWallTime", | |
| "operator": "SET", | |
| "value": { | |
| "expr": "current wallTime" | |
| } | |
| }, | |
| { | |
| "type": "EventEmission", | |
| "name": "ShapeRevealSoundPlayed" | |
| } | |
| ], | |
| "provenance": { | |
| "mechanic": "SES-R14", | |
| "gdd_quote": "| `SES-R14` | `TRANSITION`, `SOURCE_FADE` reaches `DBT-19` | If `transitionTargetShapeIndex=1`, clear the attempts array and set `sessionAverage=null`. Change to `shapeIndex=transitionTargetShapeIndex`, `committedLineCount=0`, `transitionPhase=SHAPE_REVEAL`, and `transitionPhaseStartWallTime=current wallTime`, and begin revealing `SCR-PLAY` and the target shape. If audio is `ENABLED`, play `SFX-SHAPE-REVEAL`. |", | |
| "precondition": "`TRANSITION`, `SOURCE_FADE` reaches `DBT-19`", | |
| "action": "Apply SES-R14 under the stated condition and trigger.", | |
| "expected": "If `transitionTargetShapeIndex=1`, clear the attempts array and set `sessionAverage=null`. Change to `shapeIndex=transitionTargetShapeIndex`, `committedLineCount=0`, `transitionPhase=SHAPE_REVEAL`, and `transitionPhaseStartWallTime=current wallTime`, and begin revealing `SCR-PLAY` and the target shape. If audio is `ENABLED`, play `SFX-SHAPE-REVEAL`.", | |
| "evidence": "Observe the state updates and emitted events specified by SES-R14.", | |
| "source": { | |
| "file": "gdds/small/equal_slice.md", | |
| "line_start": 67, | |
| "line_end": 67, | |
| "quote": "| `SES-R14` | `TRANSITION`, `SOURCE_FADE` reaches `DBT-19` | If `transitionTargetShapeIndex=1`, clear the attempts array and set `sessionAverage=null`. Change to `shapeIndex=transitionTargetShapeIndex`, `committedLineCount=0`, `transitionPhase=SHAPE_REVEAL`, and `transitionPhaseStartWallTime=current wallTime`, and begin revealing `SCR-PLAY` and the target shape. If audio is `ENABLED`, play `SFX-SHAPE-REVEAL`. |" | |
| } | |
| } | |
| }, | |
| { | |
| "id": "SES-R15", | |
| "label": "Finish shape reveal and enable input", | |
| "preconditions": [ | |
| { | |
| "type": "StatePredicate", | |
| "entity": "State", | |
| "attribute": "state", | |
| "operator": "==", | |
| "value": "Transition" | |
| }, | |
| { | |
| "type": "StatePredicate", | |
| "entity": "TransitionPhase", | |
| "attribute": "transitionPhase", | |
| "operator": "==", | |
| "value": "ShapeReveal" | |
| } | |
| ], | |
| "trigger": { | |
| "type": "Event", | |
| "name": "ShapeRevealCompleted" | |
| }, | |
| "effects": [ | |
| { | |
| "type": "StateUpdate", | |
| "entity": "State", | |
| "attribute": "state", | |
| "operator": "SET", | |
| "value": "Input" | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "GameSession", | |
| "attribute": "attemptStartActiveTime", | |
| "operator": "SET", | |
| "value": { | |
| "kind": "ref", | |
| "entity": "ActiveTime", | |
| "attribute": "activeTime" | |
| } | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "TransitionSource", | |
| "attribute": "transitionSource", | |
| "operator": "SET", | |
| "value": null | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "TransitionPhase", | |
| "attribute": "transitionPhase", | |
| "operator": "SET", | |
| "value": null | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "GameSession", | |
| "attribute": "transitionTargetShapeIndex", | |
| "operator": "SET", | |
| "value": null | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "GameSession", | |
| "attribute": "transitionPhaseStartWallTime", | |
| "operator": "SET", | |
| "value": null | |
| }, | |
| { | |
| "type": "EventEmission", | |
| "name": "InputMusicStartedFromBeginning" | |
| } | |
| ], | |
| "provenance": { | |
| "mechanic": "SES-R15", | |
| "gdd_quote": "| `SES-R15` | `TRANSITION`, `SHAPE_REVEAL` reaches `DBT-19` | Set `state=INPUT` and `attemptStartActiveTime=activeTime`, set the four transition fields to `null`, and allow input. If audio is `ENABLED`, start `MUS-INPUT` from the beginning. |", | |
| "precondition": "`TRANSITION`, `SHAPE_REVEAL` reaches `DBT-19`", | |
| "action": "Apply SES-R15 under the stated condition and trigger.", | |
| "expected": "Set `state=INPUT` and `attemptStartActiveTime=activeTime`, set the four transition fields to `null`, and allow input. If audio is `ENABLED`, start `MUS-INPUT` from the beginning.", | |
| "evidence": "Observe the state updates and emitted events specified by SES-R15.", | |
| "source": { | |
| "file": "gdds/small/equal_slice.md", | |
| "line_start": 68, | |
| "line_end": 68, | |
| "quote": "| `SES-R15` | `TRANSITION`, `SHAPE_REVEAL` reaches `DBT-19` | Set `state=INPUT` and `attemptStartActiveTime=activeTime`, set the four transition fields to `null`, and allow input. If audio is `ENABLED`, start `MUS-INPUT` from the beginning. |" | |
| } | |
| } | |
| }, | |
| { | |
| "id": "CUT-R4", | |
| "label": "Record a short release at the deadline as timeout", | |
| "preconditions": [ | |
| { | |
| "type": "StatePredicate", | |
| "entity": "RemainingInput", | |
| "attribute": "remainingInput", | |
| "operator": "==", | |
| "value": { | |
| "kind": "opaque", | |
| "description": "0 at the release, where the release timeStamp converted to active time equals the input deadline attemptStartActiveTime + DBT-04 (8.0 s of active input time), so the release is processed before the timeout; remainingInput is clamped at 0, so a release after the deadline, when the deadline has already passed (CUT-R9), is not covered. A pause request (SES-R7) with the same timestamp as the release is processed first and discards the drag, so that release is not covered either" | |
| } | |
| }, | |
| { | |
| "type": "StatePredicate", | |
| "entity": "State", | |
| "attribute": "state", | |
| "operator": "==", | |
| "value": "Input" | |
| }, | |
| { | |
| "type": "StatePredicate", | |
| "entity": "GameSession", | |
| "attribute": "committedLineCount", | |
| "operator": "==", | |
| "value": 0 | |
| }, | |
| { | |
| "type": "StatePredicate", | |
| "entity": "CutLine", | |
| "attribute": "length", | |
| "operator": "<", | |
| "value": { | |
| "kind": "opaque", | |
| "description": "DBT-08 = 32.0 reference px (inclusive): |P1-P0| of the active primary mouse drag in logical reference coordinates after the VIEW-1 inverse transform, P0 where the primary button was pressed inside the logical canvas and P1 the release point clamped to the canvas, so render scale does not change the threshold" | |
| } | |
| } | |
| ], | |
| "trigger": { | |
| "type": "Event", | |
| "name": "PointerRelease" | |
| }, | |
| "effects": [ | |
| { | |
| "type": "StateUpdate", | |
| "entity": "CutLine", | |
| "attribute": "preview", | |
| "operator": "SET", | |
| "value": null | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "Accuracy", | |
| "attribute": "Accuracy", | |
| "operator": "SET", | |
| "value": 0 | |
| }, | |
| { | |
| "type": "EventEmission", | |
| "name": "TimeoutRecorded" | |
| } | |
| ], | |
| "provenance": { | |
| "mechanic": "CUT-R4", | |
| "gdd_quote": "| `CUT-R4` | `INPUT`, released at the deadline and length is less than `DBT-08` | Discard the preview and record a timeout result with accuracy `0`. Proceed to `SES-R4`. |", | |
| "precondition": "`INPUT`, released at the deadline and length is less than `DBT-08`", | |
| "action": "Apply CUT-R4 under the stated condition and trigger.", | |
| "expected": "Discard the preview and record a timeout result with accuracy `0`. Proceed to `SES-R4`. If the input deadline and pointer release time are the same, convert the browser event's `timeStamp` to active time and process a release event with `≤` first. If pause and pointer release have the same timestamp, process pause first, so the drag is discarded.", | |
| "evidence": "Observe the state updates and emitted events specified by CUT-R4.", | |
| "source": { | |
| "file": "gdds/small/equal_slice.md", | |
| "line_start": 94, | |
| "line_end": 94, | |
| "quote": "| `CUT-R4` | `INPUT`, released at the deadline and length is less than `DBT-08` | Discard the preview and record a timeout result with accuracy `0`. Proceed to `SES-R4`. |" | |
| } | |
| } | |
| }, | |
| { | |
| "id": "CUT-R6", | |
| "label": "Record an invalid area calculation at deadline as timeout", | |
| "preconditions": [ | |
| { | |
| "type": "StatePredicate", | |
| "entity": "RemainingInput", | |
| "attribute": "remainingInput", | |
| "operator": "==", | |
| "value": { | |
| "kind": "opaque", | |
| "description": "0 at the release, where the release timeStamp converted to active time equals the input deadline attemptStartActiveTime + DBT-04 (8.0 s of active input time), so the release is processed before the timeout; remainingInput is clamped at 0, so a release after the deadline, when the deadline has already passed (CUT-R9), is not covered. A pause request (SES-R7) with the same timestamp as the release is processed first and discards the drag, so that release is not covered either" | |
| } | |
| }, | |
| { | |
| "type": "StatePredicate", | |
| "entity": "State", | |
| "attribute": "state", | |
| "operator": "==", | |
| "value": "Input" | |
| }, | |
| { | |
| "type": "StatePredicate", | |
| "entity": "GameSession", | |
| "attribute": "committedLineCount", | |
| "operator": "==", | |
| "value": 0 | |
| }, | |
| { | |
| "type": "StatePredicate", | |
| "entity": "CutLine", | |
| "attribute": "length", | |
| "operator": ">=", | |
| "value": { | |
| "kind": "opaque", | |
| "description": "DBT-08 = 32.0 reference px (inclusive): |P1-P0| of the active primary mouse drag in logical reference coordinates after the VIEW-1 inverse transform, P0 where the primary button was pressed inside the logical canvas and P1 the release point clamped to the canvas, so render scale does not change the threshold" | |
| } | |
| }, | |
| { | |
| "type": "StatePredicate", | |
| "entity": "CutLine", | |
| "attribute": "rawAreas", | |
| "operator": "==", | |
| "value": { | |
| "kind": "opaque", | |
| "description": "not finite, or abs((A_raw+B_raw)-A_total) > DBT-10 (0.01 px²): A_raw or B_raw from SYS-AREA is not finite, or the raw areas of the two half-planes differ from the shape total area by more than 0.01 px²" | |
| } | |
| } | |
| ], | |
| "trigger": { | |
| "type": "Event", | |
| "name": "PointerRelease" | |
| }, | |
| "effects": [ | |
| { | |
| "type": "StateUpdate", | |
| "entity": "CutLine", | |
| "attribute": "preview", | |
| "operator": "SET", | |
| "value": null | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "Accuracy", | |
| "attribute": "Accuracy", | |
| "operator": "SET", | |
| "value": 0 | |
| }, | |
| { | |
| "type": "EventEmission", | |
| "name": "CalculationErrorLogged" | |
| }, | |
| { | |
| "type": "EventEmission", | |
| "name": "TimeoutRecorded" | |
| } | |
| ], | |
| "provenance": { | |
| "mechanic": "CUT-R6", | |
| "gdd_quote": "| `CUT-R6` | `INPUT`, at the deadline, length requirement met, and the area is not finite or `abs((A_raw+B_raw)-A_total) > DBT-10` | Discard the candidate and preview and record a timeout result with accuracy `0`. Record the calculation error in the console and proceed to `SES-R4`. |", | |
| "precondition": "`INPUT`, at the deadline, length requirement met, and the area is not finite or `abs((A_raw+B_raw)-A_total) > DBT-10`", | |
| "action": "Apply CUT-R6 under the stated condition and trigger.", | |
| "expected": "Discard the candidate and preview and record a timeout result with accuracy `0`. Record the calculation error in the console and proceed to `SES-R4`. If the input deadline and pointer release time are the same, convert the browser event's `timeStamp` to active time and process a release event with `≤` first. If pause and pointer release have the same timestamp, process pause first, so the drag is discarded.", | |
| "evidence": "Observe the state updates and emitted events specified by CUT-R6.", | |
| "source": { | |
| "file": "gdds/small/equal_slice.md", | |
| "line_start": 96, | |
| "line_end": 96, | |
| "quote": "| `CUT-R6` | `INPUT`, at the deadline, length requirement met, and the area is not finite or `abs((A_raw+B_raw)-A_total) > DBT-10` | Discard the candidate and preview and record a timeout result with accuracy `0`. Record the calculation error in the console and proceed to `SES-R4`. |" | |
| } | |
| } | |
| }, | |
| { | |
| "id": "CUT-R7", | |
| "label": "Commit a valid split", | |
| "preconditions": [ | |
| { | |
| "type": "StatePredicate", | |
| "entity": "RemainingInput", | |
| "attribute": "remainingInput", | |
| "operator": ">=", | |
| "value": { | |
| "kind": "opaque", | |
| "description": "0 at the release, where the release timeStamp converted to active time is at or before the input deadline attemptStartActiveTime + DBT-04 (8.0 s of active input time); a release whose time equals the deadline is processed before the timeout. remainingInput is clamped at 0, so a release after the deadline (a CUT-R9 timeout) is not covered. A pause request (SES-R7) with the same timestamp as the release is processed first and discards the drag, so that release is not covered either" | |
| } | |
| }, | |
| { | |
| "type": "StatePredicate", | |
| "entity": "State", | |
| "attribute": "state", | |
| "operator": "==", | |
| "value": "Input" | |
| }, | |
| { | |
| "type": "StatePredicate", | |
| "entity": "GameSession", | |
| "attribute": "committedLineCount", | |
| "operator": "==", | |
| "value": 0 | |
| }, | |
| { | |
| "type": "StatePredicate", | |
| "entity": "CutLine", | |
| "attribute": "length", | |
| "operator": ">=", | |
| "value": { | |
| "kind": "opaque", | |
| "description": "DBT-08 = 32.0 reference px (inclusive): |P1-P0| of the active primary mouse drag in logical reference coordinates after the VIEW-1 inverse transform, P0 where the primary button was pressed inside the logical canvas and P1 the release point clamped to the canvas, so render scale does not change the threshold" | |
| } | |
| }, | |
| { | |
| "type": "StatePredicate", | |
| "entity": "CutLine", | |
| "attribute": "rawAreas", | |
| "operator": "==", | |
| "value": { | |
| "kind": "opaque", | |
| "description": "area preservation satisfied: A_raw and B_raw from SYS-AREA are finite and abs((A_raw+B_raw)-A_total) <= DBT-10 (0.01 px²)" | |
| } | |
| }, | |
| { | |
| "type": "StatePredicate", | |
| "entity": "CutLine", | |
| "attribute": "minSideArea", | |
| "operator": ">=", | |
| "value": { | |
| "kind": "opaque", | |
| "description": "DBT-09 = 0.5 px², compared with min(A,B) of the final areas after the SYS-AREA residual correction and tie snap; a side of exactly 0.5 px² counts as a valid split" | |
| } | |
| } | |
| ], | |
| "trigger": { | |
| "type": "Event", | |
| "name": "PointerRelease" | |
| }, | |
| "effects": [ | |
| { | |
| "type": "StateUpdate", | |
| "entity": "GameSession", | |
| "attribute": "committedLineCount", | |
| "operator": "SET", | |
| "value": 1 | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "ErrorPP", | |
| "attribute": "errorPP", | |
| "operator": "SET", | |
| "value": { | |
| "kind": "opaque", | |
| "description": "E = |P_A - P_B| in percentage points, unrounded, where P_A = 100*A/A_total and P_B = 100*B/A_total use the final SYS-AREA areas A and B (SYS-SCORE)" | |
| } | |
| }, | |
| { | |
| "type": "EventEmission", | |
| "name": "CutCommitSoundPlayed" | |
| }, | |
| { | |
| "type": "EventEmission", | |
| "name": "CommitFlashVfxPlayed" | |
| }, | |
| { | |
| "type": "EventEmission", | |
| "name": "ValidSplitCommitted" | |
| } | |
| ], | |
| "provenance": { | |
| "mechanic": "CUT-R7", | |
| "gdd_quote": "| `CUT-R7` | `INPUT`, at or before the deadline, length requirement met, area preservation satisfied, `min(A,B) ≥ DBT-09` | Commit as the only line for the current shape, set `committedLineCount=1`, and calculate `SYS-SCORE`. Proceed to `SES-R2`. |", | |
| "precondition": "`INPUT`, at or before the deadline, length requirement met, area preservation satisfied, `min(A,B) ≥ DBT-09`", | |
| "action": "Apply CUT-R7 under the stated condition and trigger.", | |
| "expected": "Commit as the only line for the current shape, set `committedLineCount=1`, and calculate `SYS-SCORE`. Proceed to `SES-R2`. If the input deadline and pointer release time are the same, convert the browser event's `timeStamp` to active time and process a release event with `≤` first. If pause and pointer release have the same timestamp, process pause first, so the drag is discarded. `SES-R7` precedes a pointer release at the same time and prevents the commit.", | |
| "evidence": "Observe the state updates and emitted events specified by CUT-R7.", | |
| "source": { | |
| "file": "gdds/small/equal_slice.md", | |
| "line_start": 97, | |
| "line_end": 97, | |
| "quote": "| `CUT-R7` | `INPUT`, at or before the deadline, length requirement met, area preservation satisfied, `min(A,B) ≥ DBT-09` | Commit as the only line for the current shape, set `committedLineCount=1`, and calculate `SYS-SCORE`. Proceed to `SES-R2`. |" | |
| } | |
| } | |
| }, | |
| { | |
| "id": "CUT-R8", | |
| "label": "Commit a non-splitting line", | |
| "preconditions": [ | |
| { | |
| "type": "StatePredicate", | |
| "entity": "RemainingInput", | |
| "attribute": "remainingInput", | |
| "operator": ">=", | |
| "value": { | |
| "kind": "opaque", | |
| "description": "0 at the release, where the release timeStamp converted to active time is at or before the input deadline attemptStartActiveTime + DBT-04 (8.0 s of active input time); a release whose time equals the deadline is processed before the timeout. remainingInput is clamped at 0, so a release after the deadline (a CUT-R9 timeout) is not covered. A pause request (SES-R7) with the same timestamp as the release is processed first and discards the drag, so that release is not covered either" | |
| } | |
| }, | |
| { | |
| "type": "StatePredicate", | |
| "entity": "State", | |
| "attribute": "state", | |
| "operator": "==", | |
| "value": "Input" | |
| }, | |
| { | |
| "type": "StatePredicate", | |
| "entity": "GameSession", | |
| "attribute": "committedLineCount", | |
| "operator": "==", | |
| "value": 0 | |
| }, | |
| { | |
| "type": "StatePredicate", | |
| "entity": "CutLine", | |
| "attribute": "length", | |
| "operator": ">=", | |
| "value": { | |
| "kind": "opaque", | |
| "description": "DBT-08 = 32.0 reference px (inclusive): |P1-P0| of the active primary mouse drag in logical reference coordinates after the VIEW-1 inverse transform, P0 where the primary button was pressed inside the logical canvas and P1 the release point clamped to the canvas, so render scale does not change the threshold" | |
| } | |
| }, | |
| { | |
| "type": "StatePredicate", | |
| "entity": "CutLine", | |
| "attribute": "rawAreas", | |
| "operator": "==", | |
| "value": { | |
| "kind": "opaque", | |
| "description": "area preservation satisfied: A_raw and B_raw from SYS-AREA are finite and abs((A_raw+B_raw)-A_total) <= DBT-10 (0.01 px²)" | |
| } | |
| }, | |
| { | |
| "type": "StatePredicate", | |
| "entity": "CutLine", | |
| "attribute": "minSideArea", | |
| "operator": "<", | |
| "value": { | |
| "kind": "opaque", | |
| "description": "DBT-09 = 0.5 px², compared with min(A,B) of the final areas after the SYS-AREA residual correction and tie snap; a side of exactly 0.5 px² counts as a valid split" | |
| } | |
| } | |
| ], | |
| "trigger": { | |
| "type": "Event", | |
| "name": "PointerRelease" | |
| }, | |
| "effects": [ | |
| { | |
| "type": "StateUpdate", | |
| "entity": "GameSession", | |
| "attribute": "committedLineCount", | |
| "operator": "SET", | |
| "value": 1 | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "Accuracy", | |
| "attribute": "Accuracy", | |
| "operator": "SET", | |
| "value": 0 | |
| }, | |
| { | |
| "type": "EventEmission", | |
| "name": "CutCommitSoundPlayed" | |
| }, | |
| { | |
| "type": "EventEmission", | |
| "name": "CommitFlashVfxPlayed" | |
| }, | |
| { | |
| "type": "EventEmission", | |
| "name": "NonSplitCommitted" | |
| } | |
| ], | |
| "provenance": { | |
| "mechanic": "CUT-R8", | |
| "gdd_quote": "| `CUT-R8` | `INPUT`, at or before the deadline, length requirement met, area preservation satisfied, `min(A,B) < DBT-09` | Commit as the only line for the current shape, set `committedLineCount=1`, and record a non-split result with accuracy `0`. Proceed to `SES-R3`. |", | |
| "precondition": "`INPUT`, at or before the deadline, length requirement met, area preservation satisfied, `min(A,B) < DBT-09`", | |
| "action": "Apply CUT-R8 under the stated condition and trigger.", | |
| "expected": "Commit as the only line for the current shape, set `committedLineCount=1`, and record a non-split result with accuracy `0`. Proceed to `SES-R3`. If the input deadline and pointer release time are the same, convert the browser event's `timeStamp` to active time and process a release event with `≤` first. If pause and pointer release have the same timestamp, process pause first, so the drag is discarded. `SES-R7` precedes a pointer release at the same time and prevents the commit.", | |
| "evidence": "Observe the state updates and emitted events specified by CUT-R8.", | |
| "source": { | |
| "file": "gdds/small/equal_slice.md", | |
| "line_start": 98, | |
| "line_end": 98, | |
| "quote": "| `CUT-R8` | `INPUT`, at or before the deadline, length requirement met, area preservation satisfied, `min(A,B) < DBT-09` | Commit as the only line for the current shape, set `committedLineCount=1`, and record a non-split result with accuracy `0`. Proceed to `SES-R3`. |" | |
| } | |
| } | |
| }, | |
| { | |
| "id": "CUT-R9", | |
| "label": "Record deadline expiration before commit", | |
| "preconditions": [ | |
| { | |
| "type": "StatePredicate", | |
| "entity": "GameSession", | |
| "attribute": "committedLineCount", | |
| "operator": "==", | |
| "value": 0 | |
| }, | |
| { | |
| "type": "StatePredicate", | |
| "entity": "RemainingInput", | |
| "attribute": "remainingInput", | |
| "operator": "==", | |
| "value": 0 | |
| }, | |
| { | |
| "type": "StatePredicate", | |
| "entity": "CutLine", | |
| "attribute": "releaseProcessed", | |
| "operator": "==", | |
| "value": { | |
| "kind": "opaque", | |
| "description": "false: no pointer release was processed at or before this input deadline (a release at the deadline goes to CUT-R4, CUT-R6, CUT-R7 or CUT-R8 first); a primary button still held down at the deadline does not count as a release" | |
| } | |
| } | |
| ], | |
| "trigger": { | |
| "type": "Event", | |
| "name": "InputDeadlinePassed" | |
| }, | |
| "effects": [ | |
| { | |
| "type": "StateUpdate", | |
| "entity": "CutLine", | |
| "attribute": "preview", | |
| "operator": "SET", | |
| "value": null | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "Accuracy", | |
| "attribute": "Accuracy", | |
| "operator": "SET", | |
| "value": 0 | |
| }, | |
| { | |
| "type": "EventEmission", | |
| "name": "TimeoutRecorded" | |
| } | |
| ], | |
| "provenance": { | |
| "mechanic": "CUT-R9", | |
| "gdd_quote": "| `CUT-R9` | The input deadline passes before a commit, with no release processed; the same applies even if a pointer is held down | Discard the preview and record a timeout result with accuracy `0`. Proceed to `SES-R4`. |", | |
| "precondition": "The input deadline passes before a commit, with no release processed; the same applies even if a pointer is held down", | |
| "action": "Apply CUT-R9 under the stated condition and trigger.", | |
| "expected": "Discard the preview and record a timeout result with accuracy `0`. Proceed to `SES-R4`.", | |
| "evidence": "Observe the state updates and emitted events specified by CUT-R9.", | |
| "source": { | |
| "file": "gdds/small/equal_slice.md", | |
| "line_start": 99, | |
| "line_end": 99, | |
| "quote": "| `CUT-R9` | The input deadline passes before a commit, with no release processed; the same applies even if a pointer is held down | Discard the preview and record a timeout result with accuracy `0`. Proceed to `SES-R4`. |" | |
| } | |
| } | |
| }, | |
| { | |
| "id": "JDG-R1", | |
| "label": "Judge an exact valid split", | |
| "preconditions": [ | |
| { | |
| "type": "StatePredicate", | |
| "entity": "ErrorPP", | |
| "attribute": "errorPP", | |
| "operator": "<=", | |
| "value": "DBT-11" | |
| } | |
| ], | |
| "trigger": { | |
| "type": "Event", | |
| "name": "ValidSplitCommitted" | |
| }, | |
| "effects": [ | |
| { | |
| "type": "StateUpdate", | |
| "entity": "Accuracy", | |
| "attribute": "Accuracy", | |
| "operator": "SET", | |
| "value": { | |
| "expr": "S" | |
| } | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "Percentages", | |
| "attribute": "percentage", | |
| "operator": "SET", | |
| "value": { | |
| "expr": "A/B" | |
| } | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "Reason", | |
| "attribute": "reason", | |
| "operator": "SET", | |
| "value": null | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "GameSession", | |
| "attribute": "judgmentRevealDelay", | |
| "operator": "SET", | |
| "value": "DBT-20" | |
| }, | |
| { | |
| "type": "EventEmission", | |
| "name": "ABSeparationVfxPlayed" | |
| }, | |
| { | |
| "type": "EventEmission", | |
| "name": "ExactBadgeShown" | |
| }, | |
| { | |
| "type": "EventEmission", | |
| "name": "SquareRingVfxPlayed" | |
| }, | |
| { | |
| "type": "EventEmission", | |
| "name": "ExactSoundPlayed" | |
| } | |
| ], | |
| "provenance": { | |
| "mechanic": "JDG-R1", | |
| "gdd_quote": "| `JDG-R1` | Valid split and unrounded `E ≤ DBT-11` | Display the calculated A/B/E/S and run A/B separation, the `Exact` badge, square ring, and `SFX-EXACT`. Store A/B/S and `reason=null` in the corresponding `SCR-RESULT` row. |", | |
| "precondition": "Valid split and unrounded `E ≤ DBT-11`", | |
| "action": "Apply JDG-R1 under the stated condition and trigger.", | |
| "expected": "Display the calculated A/B/E/S and run A/B separation, the `Exact` badge, square ring, and `SFX-EXACT`. Store A/B/S and `reason=null` in the corresponding `SCR-RESULT` row. The judgment VFX and judgment sound for `JDG-R1`–`JDG-R3`, which accompany a commit, begin on the same frame `DBT-20` after `SFX-CUT-COMMIT` starts. `JDG-R1`–`JDG-R3` first open an empty feedback strip and review bar, then show the values, reason, and VFX together after `DBT-20` of active time. This delay does not decrease while paused. If `SES-R7` is at the same time as the reveal, pause comes first and reveal occurs on the resume frame.", | |
| "evidence": "Observe the state updates and emitted events specified by JDG-R1.", | |
| "source": { | |
| "file": "gdds/small/equal_slice.md", | |
| "line_start": 202, | |
| "line_end": 202, | |
| "quote": "| `JDG-R1` | Valid split and unrounded `E ≤ DBT-11` | Display the calculated A/B/E/S and run A/B separation, the `Exact` badge, square ring, and `SFX-EXACT`. Store A/B/S and `reason=null` in the corresponding `SCR-RESULT` row. |" | |
| } | |
| } | |
| }, | |
| { | |
| "id": "JDG-R2", | |
| "label": "Judge an off-center valid split", | |
| "preconditions": [ | |
| { | |
| "type": "StatePredicate", | |
| "entity": "ErrorPP", | |
| "attribute": "errorPP", | |
| "operator": ">", | |
| "value": "DBT-11" | |
| } | |
| ], | |
| "trigger": { | |
| "type": "Event", | |
| "name": "ValidSplitCommitted" | |
| }, | |
| "effects": [ | |
| { | |
| "type": "StateUpdate", | |
| "entity": "Accuracy", | |
| "attribute": "Accuracy", | |
| "operator": "SET", | |
| "value": { | |
| "expr": "S" | |
| } | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "Percentages", | |
| "attribute": "percentage", | |
| "operator": "SET", | |
| "value": { | |
| "expr": "A/B" | |
| } | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "Reason", | |
| "attribute": "reason", | |
| "operator": "SET", | |
| "value": null | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "GameSession", | |
| "attribute": "judgmentRevealDelay", | |
| "operator": "SET", | |
| "value": "DBT-20" | |
| }, | |
| { | |
| "type": "EventEmission", | |
| "name": "ABSeparationVfxPlayed" | |
| }, | |
| { | |
| "type": "EventEmission", | |
| "name": "GrayTickMarkVfxPlayed" | |
| }, | |
| { | |
| "type": "EventEmission", | |
| "name": "OffSoundPlayed" | |
| } | |
| ], | |
| "provenance": { | |
| "mechanic": "JDG-R2", | |
| "gdd_quote": "| `JDG-R2` | Valid split and unrounded `E > DBT-11` | Display the calculated A/B/E/S and run A/B separation, the gray tick-mark VFX, and `SFX-OFF`. There is no `Exact` badge. Store A/B/S and `reason=null` in the corresponding `SCR-RESULT` row. |", | |
| "precondition": "Valid split and unrounded `E > DBT-11`", | |
| "action": "Apply JDG-R2 under the stated condition and trigger.", | |
| "expected": "Display the calculated A/B/E/S and run A/B separation, the gray tick-mark VFX, and `SFX-OFF`. There is no `Exact` badge. Store A/B/S and `reason=null` in the corresponding `SCR-RESULT` row. The judgment VFX and judgment sound for `JDG-R1`–`JDG-R3`, which accompany a commit, begin on the same frame `DBT-20` after `SFX-CUT-COMMIT` starts. `JDG-R1`–`JDG-R3` first open an empty feedback strip and review bar, then show the values, reason, and VFX together after `DBT-20` of active time. This delay does not decrease while paused. If `SES-R7` is at the same time as the reveal, pause comes first and reveal occurs on the resume frame.", | |
| "evidence": "Observe the state updates and emitted events specified by JDG-R2.", | |
| "source": { | |
| "file": "gdds/small/equal_slice.md", | |
| "line_start": 203, | |
| "line_end": 203, | |
| "quote": "| `JDG-R2` | Valid split and unrounded `E > DBT-11` | Display the calculated A/B/E/S and run A/B separation, the gray tick-mark VFX, and `SFX-OFF`. There is no `Exact` badge. Store A/B/S and `reason=null` in the corresponding `SCR-RESULT` row. |" | |
| } | |
| } | |
| }, | |
| { | |
| "id": "JDG-R3", | |
| "label": "Present non-split judgment", | |
| "preconditions": [], | |
| "trigger": { | |
| "type": "Event", | |
| "name": "NonSplitCommitted" | |
| }, | |
| "effects": [ | |
| { | |
| "type": "StateUpdate", | |
| "entity": "Percentages", | |
| "attribute": "percentage", | |
| "operator": "SET", | |
| "value": null | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "Reason", | |
| "attribute": "reason", | |
| "operator": "SET", | |
| "value": "Failed to divide the shape into two areas" | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "Accuracy", | |
| "attribute": "Accuracy", | |
| "operator": "SET", | |
| "value": 0 | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "GameSession", | |
| "attribute": "judgmentRevealDelay", | |
| "operator": "SET", | |
| "value": "DBT-20" | |
| }, | |
| { | |
| "type": "EventEmission", | |
| "name": "OutlineDimmingVfxPlayed" | |
| }, | |
| { | |
| "type": "EventEmission", | |
| "name": "NonsplitSoundPlayed" | |
| } | |
| ], | |
| "provenance": { | |
| "mechanic": "JDG-R3", | |
| "gdd_quote": "| `JDG-R3` | Non-split from `CUT-R8` | A/B are `—`, the reason is `Failed to divide the shape into two areas`, and accuracy is `0.0%`; run the outline dimming and `SFX-NONSPLIT`, and store the same reason in the corresponding `SCR-RESULT` row. |", | |
| "precondition": "Non-split from `CUT-R8`", | |
| "action": "Apply JDG-R3 under the stated condition and trigger.", | |
| "expected": "A/B are `—`, the reason is `Failed to divide the shape into two areas`, and accuracy is `0.0%`; run the outline dimming and `SFX-NONSPLIT`, and store the same reason in the corresponding `SCR-RESULT` row. The judgment VFX and judgment sound for `JDG-R1`–`JDG-R3`, which accompany a commit, begin on the same frame `DBT-20` after `SFX-CUT-COMMIT` starts. `JDG-R1`–`JDG-R3` first open an empty feedback strip and review bar, then show the values, reason, and VFX together after `DBT-20` of active time. This delay does not decrease while paused. If `SES-R7` is at the same time as the reveal, pause comes first and reveal occurs on the resume frame.", | |
| "evidence": "Observe the state updates and emitted events specified by JDG-R3.", | |
| "source": { | |
| "file": "gdds/small/equal_slice.md", | |
| "line_start": 204, | |
| "line_end": 204, | |
| "quote": "| `JDG-R3` | Non-split from `CUT-R8` | A/B are `—`, the reason is `Failed to divide the shape into two areas`, and accuracy is `0.0%`; run the outline dimming and `SFX-NONSPLIT`, and store the same reason in the corresponding `SCR-RESULT` row. |" | |
| } | |
| } | |
| }, | |
| { | |
| "id": "JDG-R4", | |
| "label": "Present timeout judgment", | |
| "preconditions": [], | |
| "trigger": { | |
| "type": "Event", | |
| "name": "TimeoutRecorded" | |
| }, | |
| "effects": [ | |
| { | |
| "type": "StateUpdate", | |
| "entity": "Percentages", | |
| "attribute": "percentage", | |
| "operator": "SET", | |
| "value": null | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "Reason", | |
| "attribute": "reason", | |
| "operator": "SET", | |
| "value": "Timeout" | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "Accuracy", | |
| "attribute": "Accuracy", | |
| "operator": "SET", | |
| "value": 0 | |
| }, | |
| { | |
| "type": "EventEmission", | |
| "name": "ShapeDimmingVfxPlayed" | |
| }, | |
| { | |
| "type": "EventEmission", | |
| "name": "TimeoutSoundPlayed" | |
| } | |
| ], | |
| "provenance": { | |
| "mechanic": "JDG-R4", | |
| "gdd_quote": "| `JDG-R4` | Timeout from one of `CUT-R4`, `CUT-R6`, `CUT-R9` | A/B are `—`, the reason is `Timeout`, and accuracy is `0.0%`; run the shape dimming and `SFX-TIMEOUT`, and store the same reason in the corresponding `SCR-RESULT` row. |", | |
| "precondition": "Timeout from one of `CUT-R4`, `CUT-R6`, `CUT-R9`", | |
| "action": "Apply JDG-R4 under the stated condition and trigger.", | |
| "expected": "A/B are `—`, the reason is `Timeout`, and accuracy is `0.0%`; run the shape dimming and `SFX-TIMEOUT`, and store the same reason in the corresponding `SCR-RESULT` row. The VFX and judgment sound for `JDG-R4`, which has no commit, begin together on the feedback start frame. `JDG-R4` shows its content on the feedback start frame.", | |
| "evidence": "Observe the state updates and emitted events specified by JDG-R4.", | |
| "source": { | |
| "file": "gdds/small/equal_slice.md", | |
| "line_start": 205, | |
| "line_end": 205, | |
| "quote": "| `JDG-R4` | Timeout from one of `CUT-R4`, `CUT-R6`, `CUT-R9` | A/B are `—`, the reason is `Timeout`, and accuracy is `0.0%`; run the shape dimming and `SFX-TIMEOUT`, and store the same reason in the corresponding `SCR-RESULT` row. |" | |
| } | |
| } | |
| }, | |
| { | |
| "id": "START-R2", | |
| "label": "Block startup when shape data is invalid", | |
| "preconditions": [ | |
| { | |
| "type": "StatePredicate", | |
| "entity": "GameSession", | |
| "attribute": "startupPhase", | |
| "operator": "==", | |
| "value": "AssetLoad" | |
| }, | |
| { | |
| "type": "StatePredicate", | |
| "entity": "Shape", | |
| "attribute": "validation", | |
| "operator": "==", | |
| "value": { | |
| "kind": "opaque", | |
| "description": "failed: at least one ShapeDef has a non-finite vertex, fewer than 3 vertices, intersecting nonadjacent boundary edges, triangle-fan areas of mixed sign or an area of 0, or a fan-sum or shoelace total area that differs from ShapeDef.totalArea by more than DBT-10 (0.01 px²)" | |
| } | |
| } | |
| ], | |
| "trigger": null, | |
| "effects": [ | |
| { | |
| "type": "StateUpdate", | |
| "entity": "GameSession", | |
| "attribute": "startupPhase", | |
| "operator": "SET", | |
| "value": "Blocked" | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "Button", | |
| "attribute": "startButton", | |
| "operator": "SET", | |
| "value": "Disabled: Shape Data Error" | |
| } | |
| ], | |
| "provenance": { | |
| "mechanic": "START-R2", | |
| "gdd_quote": "| `START-R2` | `startupPhase=ASSET_LOAD`, one of the following: a shape vertex is not finite; there are fewer than 3 vertices; nonadjacent boundary edges intersect; triangle-fan signs are mixed or an area is 0; or the difference between the fan sum or shoelace total area and `ShapeDef.totalArea` exceeds `DBT-10` | Set `startupPhase=BLOCKED`; change the button to the disabled label `Shape Data Error` and preserve the state. |", | |
| "precondition": "`startupPhase=ASSET_LOAD`, one of the following: a shape vertex is not finite; there are fewer than 3 vertices; nonadjacent boundary edges intersect; triangle-fan signs are mixed or an area is 0; or the difference between the fan sum or shoelace total area and `ShapeDef.totalArea` exceeds `DBT-10`", | |
| "action": "Block startup when shape data is invalid", | |
| "expected": "Set `startupPhase=BLOCKED`; change the button to the disabled label `Shape Data Error` and preserve the state.", | |
| "evidence": "Observe the state updates and emitted events specified by START-R2.", | |
| "source": { | |
| "file": "gdds/small/equal_slice.md", | |
| "line_start": 427, | |
| "line_end": 427, | |
| "quote": "| `START-R2` | `startupPhase=ASSET_LOAD`, one of the following: a shape vertex is not finite; there are fewer than 3 vertices; nonadjacent boundary edges intersect; triangle-fan signs are mixed or an area is 0; or the difference between the fan sum or shoelace total area and `ShapeDef.totalArea` exceeds `DBT-10` | Set `startupPhase=BLOCKED`; change the button to the disabled label `Shape Data Error` and preserve the state. |" | |
| } | |
| } | |
| }, | |
| { | |
| "id": "START-R3", | |
| "label": "Use fallback fonts after font loading failure", | |
| "preconditions": [ | |
| { | |
| "type": "StatePredicate", | |
| "entity": "GameSession", | |
| "attribute": "startupPhase", | |
| "operator": "==", | |
| "value": "AssetLoad" | |
| }, | |
| { | |
| "type": "StatePredicate", | |
| "entity": "Shape", | |
| "attribute": "validation", | |
| "operator": "==", | |
| "value": { | |
| "kind": "opaque", | |
| "description": "succeeded: every ShapeDef has only finite vertices, at least 3 vertices, no intersecting nonadjacent boundary edges, triangle-fan areas of one sign with none equal to 0, and fan-sum and shoelace total areas within DBT-10 (0.01 px²) of ShapeDef.totalArea" | |
| } | |
| }, | |
| { | |
| "type": "StatePredicate", | |
| "entity": "Font", | |
| "attribute": "loadStatus", | |
| "operator": "==", | |
| "value": { | |
| "kind": "opaque", | |
| "description": "at least one of the two bundled fonts (Noto Sans KR Regular 400 and Bold 700 WOFF2) failed, counting a font not ready by the 2.0 s deadline from startupLoadStartWallTime as failed" | |
| } | |
| } | |
| ], | |
| "trigger": null, | |
| "effects": [ | |
| { | |
| "type": "StateUpdate", | |
| "entity": "GameSession", | |
| "attribute": "startupPhase", | |
| "operator": "SET", | |
| "value": "TitleReady" | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "Font", | |
| "attribute": "family", | |
| "operator": "SET", | |
| "value": "sans-serif 400/700" | |
| }, | |
| { | |
| "type": "EventEmission", | |
| "name": "FallbackFontNoticeShown" | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "Button", | |
| "attribute": "startButton", | |
| "operator": "SET", | |
| "value": "Enabled: Start" | |
| } | |
| ], | |
| "provenance": { | |
| "mechanic": "START-R3", | |
| "gdd_quote": "| `START-R3` | `startupPhase=ASSET_LOAD`, shape validation succeeds, at least one of the two fonts fails | Set `startupPhase=TITLE_READY`; use CSS `sans-serif` 400/700, display the `Using Fallback Font` notification for `DBT-23`, then enable the Start button and leave audio status as `UNINITIALIZED`. |", | |
| "precondition": "`startupPhase=ASSET_LOAD`, shape validation succeeds, at least one of the two fonts fails", | |
| "action": "Apply START-R3 under the stated condition and trigger.", | |
| "expected": "Set `startupPhase=TITLE_READY`; use CSS `sans-serif` 400/700, display the `Using Fallback Font` notification for `DBT-23`, then enable the Start button and leave audio status as `UNINITIALIZED`.", | |
| "evidence": "Observe the state updates and emitted events specified by START-R3.", | |
| "source": { | |
| "file": "gdds/small/equal_slice.md", | |
| "line_start": 428, | |
| "line_end": 428, | |
| "quote": "| `START-R3` | `startupPhase=ASSET_LOAD`, shape validation succeeds, at least one of the two fonts fails | Set `startupPhase=TITLE_READY`; use CSS `sans-serif` 400/700, display the `Using Fallback Font` notification for `DBT-23`, then enable the Start button and leave audio status as `UNINITIALIZED`. |" | |
| } | |
| } | |
| }, | |
| { | |
| "id": "START-R4", | |
| "label": "Make title ready after assets load", | |
| "preconditions": [ | |
| { | |
| "type": "StatePredicate", | |
| "entity": "GameSession", | |
| "attribute": "startupPhase", | |
| "operator": "==", | |
| "value": "AssetLoad" | |
| }, | |
| { | |
| "type": "StatePredicate", | |
| "entity": "Shape", | |
| "attribute": "validation", | |
| "operator": "==", | |
| "value": { | |
| "kind": "opaque", | |
| "description": "succeeded: every ShapeDef has only finite vertices, at least 3 vertices, no intersecting nonadjacent boundary edges, triangle-fan areas of one sign with none equal to 0, and fan-sum and shoelace total areas within DBT-10 (0.01 px²) of ShapeDef.totalArea" | |
| } | |
| }, | |
| { | |
| "type": "StatePredicate", | |
| "entity": "Font", | |
| "attribute": "loadStatus", | |
| "operator": "==", | |
| "value": { | |
| "kind": "opaque", | |
| "description": "both bundled fonts (Noto Sans KR Regular 400 and Bold 700 WOFF2) loaded successfully within the 2.0 s deadline from startupLoadStartWallTime" | |
| } | |
| } | |
| ], | |
| "trigger": null, | |
| "effects": [ | |
| { | |
| "type": "StateUpdate", | |
| "entity": "GameSession", | |
| "attribute": "startupPhase", | |
| "operator": "SET", | |
| "value": "TitleReady" | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "Button", | |
| "attribute": "startButton", | |
| "operator": "SET", | |
| "value": "Enabled: Start" | |
| } | |
| ], | |
| "provenance": { | |
| "mechanic": "START-R4", | |
| "gdd_quote": "| `START-R4` | `startupPhase=ASSET_LOAD`, shape validation and loading both fonts succeed | Set `startupPhase=TITLE_READY`; enable the Start button and leave audio status as `UNINITIALIZED`. Accept `SCR-TITLE` controls. |", | |
| "precondition": "`startupPhase=ASSET_LOAD`, shape validation and loading both fonts succeed", | |
| "action": "Apply START-R4 under the stated condition and trigger.", | |
| "expected": "Set `startupPhase=TITLE_READY`; enable the Start button and leave audio status as `UNINITIALIZED`. Accept `SCR-TITLE` controls.", | |
| "evidence": "Observe the state updates and emitted events specified by START-R4.", | |
| "source": { | |
| "file": "gdds/small/equal_slice.md", | |
| "line_start": 429, | |
| "line_end": 429, | |
| "quote": "| `START-R4` | `startupPhase=ASSET_LOAD`, shape validation and loading both fonts succeed | Set `startupPhase=TITLE_READY`; enable the Start button and leave audio status as `UNINITIALIZED`. Accept `SCR-TITLE` controls. |" | |
| } | |
| } | |
| }, | |
| { | |
| "id": "START-R5", | |
| "label": "Begin audio preparation on first start", | |
| "preconditions": [ | |
| { | |
| "type": "StatePredicate", | |
| "entity": "GameSession", | |
| "attribute": "AUDIO", | |
| "operator": "==", | |
| "value": "Uninitialized" | |
| }, | |
| { | |
| "type": "StatePredicate", | |
| "entity": "State", | |
| "attribute": "state", | |
| "operator": "==", | |
| "value": "Title" | |
| } | |
| ], | |
| "trigger": { | |
| "type": "Event", | |
| "name": "StartConfirmed" | |
| }, | |
| "effects": [ | |
| { | |
| "type": "EventEmission", | |
| "name": "StartButtonPressVfxPlayed" | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "GameSession", | |
| "attribute": "audioLoadStartWallTime", | |
| "operator": "SET", | |
| "value": { | |
| "expr": "current wallTime" | |
| } | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "GameSession", | |
| "attribute": "AUDIO", | |
| "operator": "SET", | |
| "value": "Pending" | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "Button", | |
| "attribute": "startButton", | |
| "operator": "SET", | |
| "value": "Disabled: Preparing Audio" | |
| } | |
| ], | |
| "provenance": { | |
| "mechanic": "START-R5", | |
| "gdd_quote": "| `START-R5` | `TITLE`, audio `UNINITIALIZED`, Start confirmed | Start the button-press VFX on this input frame, set `audioLoadStartWallTime=current wallTime`, change audio status to `PENDING`, then change the button to the disabled label `Preparing Audio`. Do not start the session timer. The later confirmation sound in `START-R7` does not restart the button VFX. |", | |
| "precondition": "`TITLE`, audio `UNINITIALIZED`, Start confirmed", | |
| "action": "Apply START-R5 under the stated condition and trigger.", | |
| "expected": "Start the button-press VFX on this input frame, set `audioLoadStartWallTime=current wallTime`, change audio status to `PENDING`, then change the button to the disabled label `Preparing Audio`. Do not start the session timer. The later confirmation sound in `START-R7` does not restart the button VFX.", | |
| "evidence": "Observe the state updates and emitted events specified by START-R5.", | |
| "source": { | |
| "file": "gdds/small/equal_slice.md", | |
| "line_start": 430, | |
| "line_end": 430, | |
| "quote": "| `START-R5` | `TITLE`, audio `UNINITIALIZED`, Start confirmed | Start the button-press VFX on this input frame, set `audioLoadStartWallTime=current wallTime`, change audio status to `PENDING`, then change the button to the disabled label `Preparing Audio`. Do not start the session timer. The later confirmation sound in `START-R7` does not restart the button VFX. |" | |
| } | |
| } | |
| }, | |
| { | |
| "id": "START-R6", | |
| "label": "Disable audio when preparation fails or times out", | |
| "preconditions": [ | |
| { | |
| "type": "StatePredicate", | |
| "entity": "GameSession", | |
| "attribute": "AUDIO", | |
| "operator": "==", | |
| "value": "Pending" | |
| }, | |
| { | |
| "type": "StatePredicate", | |
| "entity": "NowWallTime", | |
| "attribute": "nowWallTime", | |
| "operator": ">=", | |
| "value": { | |
| "kind": "opaque", | |
| "description": "the failure instant when AudioContext creation or resume fails, or when fetching and decoding both OGG and WAV fail for at least one of the 18 logical audio IDs; otherwise audioLoadStartWallTime + 1.70 s, reached without the START-R7 condition (AudioContext running and one decoded AudioBuffer ready for each of the 18 logical IDs) being met" | |
| } | |
| } | |
| ], | |
| "trigger": { | |
| "type": "Event", | |
| "name": "AudioPreparationFailed" | |
| }, | |
| "effects": [ | |
| { | |
| "type": "EventEmission", | |
| "name": "AudioRequestsCancelled" | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "GameSession", | |
| "attribute": "audioLoadStartWallTime", | |
| "operator": "SET", | |
| "value": null | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "GameSession", | |
| "attribute": "AUDIO", | |
| "operator": "SET", | |
| "value": "Disabled" | |
| }, | |
| { | |
| "type": "EventEmission", | |
| "name": "UnableToPlayAudioNoticeShown" | |
| }, | |
| { | |
| "type": "EventEmission", | |
| "name": "SessionStart" | |
| } | |
| ], | |
| "provenance": { | |
| "mechanic": "START-R6", | |
| "gdd_quote": "| `START-R6` | Audio `PENDING`, AudioContext creation or resume has failed, or fetching and decoding both OGG and WAV have failed for at least one logical audio ID, or `current wallTime-audioLoadStartWallTime ≥ 1.70 s` without the `START-R7` condition being met | Cancel remaining audio requests, set `audioLoadStartWallTime=null`, lock audio status to `DISABLED` for the lifetime of the page, and display the `Unable to Play Audio` notification for `DBT-23`. Emit `sessionStart` silently after the button-press VFX. |", | |
| "precondition": "Audio `PENDING`, AudioContext creation or resume has failed, or fetching and decoding both OGG and WAV have failed for at least one logical audio ID, or `current wallTime-audioLoadStartWallTime ≥ 1.70 s` without the `START-R7` condition being met", | |
| "action": "Apply START-R6 under the stated condition and trigger.", | |
| "expected": "Cancel remaining audio requests, set `audioLoadStartWallTime=null`, lock audio status to `DISABLED` for the lifetime of the page, and display the `Unable to Play Audio` notification for `DBT-23`. Emit `sessionStart` silently after the button-press VFX.", | |
| "evidence": "Observe the state updates and emitted events specified by START-R6.", | |
| "source": { | |
| "file": "gdds/small/equal_slice.md", | |
| "line_start": 431, | |
| "line_end": 431, | |
| "quote": "| `START-R6` | Audio `PENDING`, AudioContext creation or resume has failed, or fetching and decoding both OGG and WAV have failed for at least one logical audio ID, or `current wallTime-audioLoadStartWallTime ≥ 1.70 s` without the `START-R7` condition being met | Cancel remaining audio requests, set `audioLoadStartWallTime=null`, lock audio status to `DISABLED` for the lifetime of the page, and display the `Unable to Play Audio` notification for `DBT-23`. Emit `sessionStart` silently after the button-press VFX. |" | |
| } | |
| } | |
| }, | |
| { | |
| "id": "START-R7", | |
| "label": "Enable audio when all logical sounds are ready", | |
| "preconditions": [ | |
| { | |
| "type": "StatePredicate", | |
| "entity": "GameSession", | |
| "attribute": "AUDIO", | |
| "operator": "==", | |
| "value": "Pending" | |
| }, | |
| { | |
| "type": "StatePredicate", | |
| "entity": "GameSession", | |
| "attribute": "audioReadiness", | |
| "operator": "==", | |
| "value": { | |
| "kind": "opaque", | |
| "description": "the AudioContext is running and one AudioBuffer decoded from OGG or WAV is ready for each of the 18 logical IDs in AST-AUDIO (4 music tracks and 14 sound effects)" | |
| } | |
| } | |
| ], | |
| "trigger": null, | |
| "effects": [ | |
| { | |
| "type": "StateUpdate", | |
| "entity": "GameSession", | |
| "attribute": "audioLoadStartWallTime", | |
| "operator": "SET", | |
| "value": null | |
| }, | |
| { | |
| "type": "StateUpdate", | |
| "entity": "GameSession", | |
| "attribute": "AUDIO", | |
| "operator": "SET", | |
| "value": "Enabled" | |
| }, | |
| { | |
| "type": "EventEmission", | |
| "name": "ConfirmSoundPlayed" | |
| }, | |
| { | |
| "type": "EventEmission", | |
| "name": "SessionStart" | |
| } | |
| ], | |
| "provenance": { | |
| "mechanic": "START-R7", | |
| "gdd_quote": "| `START-R7` | Audio `PENDING`, the AudioContext is running, and one AudioBuffer decoded from OGG or WAV is ready for each of the 18 logical IDs in `AST-AUDIO` | Set `audioLoadStartWallTime=null`, change audio status to `ENABLED`, play `SFX-UI-CONFIRM`, then emit `sessionStart`. |", | |
| "precondition": "Audio `PENDING`, the AudioContext is running, and one AudioBuffer decoded from OGG or WAV is ready for each of the 18 logical IDs in `AST-AUDIO`", | |
| "action": "Apply START-R7 under the stated condition and trigger.", | |
| "expected": "Set `audioLoadStartWallTime=null`, change audio status to `ENABLED`, play `SFX-UI-CONFIRM`, then emit `sessionStart`.", | |
| "evidence": "Observe the state updates and emitted events specified by START-R7.", | |
| "source": { | |
| "file": "gdds/small/equal_slice.md", | |
| "line_start": 432, | |
| "line_end": 432, | |
| "quote": "| `START-R7` | Audio `PENDING`, the AudioContext is running, and one AudioBuffer decoded from OGG or WAV is ready for each of the 18 logical IDs in `AST-AUDIO` | Set `audioLoadStartWallTime=null`, change audio status to `ENABLED`, play `SFX-UI-CONFIRM`, then emit `sessionStart`. |" | |
| } | |
| } | |
| } | |
| ] | |