Building Games in SC#: Game menus and screen transitions
4 passed12 failed |
25.0% |
IN795 661
OUT67 823 |
| ✓ |
MenusAndScreensThe model builds an app with nested keyboard menus and screen transitions (around a small Snake game) from the task as an agent; this item passes when the app compiles and can be exported, and each hidden test is its own item.6 AI queries
8 tool calls |
Passed |
IN795 661
OUT67 823 |
| × |
Hidden_ControlsA direction takes a new key; a key used by another direction is rejected; Escape cancels; Reset to default is skipped while disabled.0 AI queries
0 tool callsHiddenTestAssertion expression evaluated to false: selected == 5
Context: Reset to default is disabled with the default keys, so Down goes to Back
Values:
selected = 3 (line 692) |
Failed |
IN0
OUT0 |
| × |
Hidden_DifficultyThe difficulty screen opens on the current difficulty; choosing one returns to options, and the game uses its speed.0 AI queries
0 tool callsHiddenTestAssertion expression evaluated to false: difficulty == 2 && screen == 1 && selected == 2
Context: Hard: difficulty 2, screen 0, selected 1
Values:
difficulty = 2
screen = 0
selected = 1 (line 673) |
Failed |
IN0
OUT0 |
| × |
Hidden_GameBasicsThe game steps every stepFrames frames, grows on food, and a game that ends with points opens the name entry.0 AI queries
0 tool callsHiddenTestAssertion expression evaluated to false: snakeX[0] == 11 && snakeX[2] == 9
Context: first step: head x 10
Values:
snakeX[0] = 10
snakeX[2] = 8 (line 747) |
Failed |
IN0
OUT0 |
| × |
Hidden_GameScreenThe game screen shows the snake, its head and the food on their cells.0 AI queries
0 tool callsHiddenTestAssertion expression evaluated to false: head.Found && head.X == 100 && head.Y == 120 && head.Width == 10 && head.Height == 10
Context: head at (0, 0) size 0x0
Values:
head.Found = false
head.X = 0
head.Y = 0
head.Width = 0
head.Height = 0 (line 913) |
Failed |
IN0
OUT0 |
| × |
Hidden_HighScoreListHigh scores stay sorted, a new equal score goes after the old one, only the best 5 stay, and a score below them is not entered.0 AI queries
0 tool callsHiddenTestAssertion expression evaluated to false: screen == 9
Context: 30 beats 10
Values:
screen = 7 (line 848) |
Failed |
IN0
OUT0 |
| ✓ |
Hidden_InitialStateAfter AppInit the main menu is open with Start selected, and the settings and high scores have their starting values.0 AI queries
0 tool callsHiddenTest |
Passed |
IN0
OUT0 |
| ✓ |
Hidden_MainMenuNavigationUp and Down move the selection with wrap-around; Escape on the main menu does nothing.0 AI queries
0 tool callsHiddenTest |
Passed |
IN0
OUT0 |
| × |
Hidden_NameEntryThe name entry changes letters with Up and Down (with wrap-around) and moves with Left and Right; Enter saves the score.0 AI queries
0 tool callsHiddenTestAssertion expression evaluated to false: screen == 9
Context: name entry: screen 7
Values:
screen = 7 (line 818) |
Failed |
IN0
OUT0 |
| ✓ |
Hidden_OptionsAndBackOptions opens with its first item selected; Escape and Back return to the main menu with Options selected.0 AI queries
0 tool callsHiddenTest |
Passed |
IN0
OUT0 |
| × |
Hidden_PauseAndResumeP opens the pause menu, nothing moves while paused, and Resume continues the game exactly where it was.0 AI queries
0 tool callsHiddenTestAssertion expression evaluated to false: screen == 8 && selected == 0 && Frame.HasText("PAUSED") && Frame.HasText("> Resume")
Context: pause: screen 7
Values:
screen = 7
selected = 0 (line 775) |
Failed |
IN0
OUT0 |
| × |
Hidden_PauseOptionsAndQuitOptions opened from the pause menu return to the pause menu; Quit to menu ends the game without a high score.0 AI queries
0 tool callsHiddenTestAssertion expression evaluated to false: screen == 1 && selected == 0
Context: options from the pause menu: screen 1
Values:
screen = 1
selected = 1 (line 800) |
Failed |
IN0
OUT0 |
| × |
Hidden_QuitQuit shows GOODBYE and AppLoop returns false from then on.0 AI queries
0 tool callsHiddenTestAssertion expression evaluated to false: !hmRunning && screen == 10
Context: AppLoop returned true, screen 10
Values:
hmRunning = true
screen = 10 (line 899) |
Failed |
IN0
OUT0 |
| × |
Hidden_RemappedSteeringThe snake steers with the keys from controlKeys only.0 AI queries
0 tool callsHiddenTestAssertion expression evaluated to false: dir == 0
Context: W steers up: dir 1
Values:
dir = 1 (line 730) |
Failed |
IN0
OUT0 |
| × |
Hidden_ResetConfirmationReset asks for confirmation with No selected; No keeps the scores, Yes deletes them and leaves only Back enabled.0 AI queries
0 tool callsHiddenTestAssertion expression evaluated to false: screen == 5 && selected == 1 && Frame.HasText("NO SCORES YET") && Frame.HasText("> Back")
Context: empty high scores: selected 0
Values:
screen = 5
selected = 0 (line 868) |
Failed |
IN0
OUT0 |
| × |
Hidden_VolumeLeft and Right change the volume within 0 to 10 only while Volume is selected; Back returns to options.0 AI queries
0 tool callsHiddenTestAssertion expression evaluated to false: screen == 1 && selected == 0
Context: Back: screen 0, selected 1
Values:
screen = 0
selected = 1 (line 659) |
Failed |
IN0
OUT0 |