Building Games in SC#: Battle City-like tank battle
10 passed6 failed1 broken |
58.8% |
IN1 167 194
OUT19 269 |
| ! |
BattleCityThe model builds a Battle City tank 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.1 AI query
28 tool calls |
Broken |
IN1 167 194
OUT19 269 |
| ✓ |
Hidden_BaseAndRestartA bullet that reaches the base ends the game; the game stops, and Enter starts a new one.0 AI queries
0 tool callsHiddenTest |
Passed |
IN0
OUT0 |
| ✓ |
Hidden_BulletsAndWallsA bullet destroys the first brick in its way and stops; steel stops it; water and trees let it pass.0 AI queries
0 tool callsHiddenTest |
Passed |
IN0
OUT0 |
| ✓ |
Hidden_EnemiesEnemies appear on the spawn cells, at most 4 at once and 20 in all; they step every 8 frames onto passable cells only, and they shoot.0 AI queries
0 tool callsHiddenTest |
Passed |
IN0
OUT0 |
| ✓ |
Hidden_EnemiesStayOffWaterAn enemy never drives onto water or steel: shut in by them, it stays on its cell.0 AI queries
0 tool callsHiddenTest |
Passed |
IN0
OUT0 |
| ✓ |
Hidden_EnemyBulletsEnemy bullets destroy bricks and pass through enemy tanks, but do not destroy steel.0 AI queries
0 tool callsHiddenTest |
Passed |
IN0
OUT0 |
| × |
Hidden_FiringSpace fires one bullet from the center of the tank; it flies 4 px per frame and a second Space does nothing while it flies.0 AI queries
0 tool callsHiddenTestAssertion expression evaluated to false: shotActive && Hidden_Near(shotX, 88) && Hidden_Near(shotY, 120) && shotDir == 1
Context: the bullet at the tank's center: (92, 120)
Values:
shotActive = true
shotDir = 1 (line 717) |
Failed |
IN0
OUT0 |
| ✓ |
Hidden_HittingEnemiesA bullet destroys an enemy tank and gives 100 points.0 AI queries
0 tool callsHiddenTest |
Passed |
IN0
OUT0 |
| ✓ |
Hidden_InitialStateAfter AppInit the board is the given map, and the player, the counters and the lists have their starting values.0 AI queries
0 tool callsHiddenTest |
Passed |
IN0
OUT0 |
| × |
Hidden_PlayerHitAn enemy bullet that reaches the player costs a life and sends the tank back to its start with a 90 frame shield; the helmet protects; the last life ends the game.0 AI queries
0 tool callsHiddenTestAssertion expression evaluated to false: playerX == 4 && playerY == 12 && playerDir == 0 && shieldFrames > 80 && shieldFrames < 90
Context: back at the start with a shield: (4, 12), shieldFrames 90
Values:
playerX = 4
playerY = 12
playerDir = 0
shieldFrames = 90 (line 815) |
Failed |
IN0
OUT0 |
| ✓ |
Hidden_PlayerMovesThe tank moves one cell when an arrow key is held, waits 4 frames before the next move, and only turns when the way is blocked.0 AI queries
0 tool callsHiddenTest |
Passed |
IN0
OUT0 |
| × |
Hidden_PowerUpsThe grenade removes all enemies on the board without score; the helmet gives a 300 frame shield; stars stop at 2.0 AI queries
0 tool callsHiddenTestAssertion expression evaluated to false: shieldFrames == 299
Context: helmet: shieldFrames 300
Values:
shieldFrames = 300 (line 993) |
Failed |
IN0
OUT0 |
| ✓ |
Hidden_PowerUpsAppearAt least one power-up appears for every 7 enemies destroyed by bullets, on an empty cell.0 AI queries
0 tool callsHiddenTest |
Passed |
IN0
OUT0 |
| × |
Hidden_ScreenThe screen shows the board cells, the tanks, a bullet, a power-up and the texts; trees cover tanks.0 AI queries
0 tool callsHiddenTestAssertion expression evaluated to false: Frame.CountPixels(Color.Hex(0x2E7D32)) == trees * 256
Context: trees (line 1076) |
Failed |
IN0
OUT0 |
| × |
Hidden_StarsStars make the player's bullets faster, and with 2 stars they destroy steel.0 AI queries
0 tool callsHiddenTestAssertion expression evaluated to false: Hidden_Near(shotX, 96)
Context: 8 px per frame with a star: shotX 104 (line 760) |
Failed |
IN0
OUT0 |
| × |
Hidden_TimerThe timer freezes the enemies: they neither move nor shoot.0 AI queries
0 tool callsHiddenTestAssertion expression evaluated to false: powerX.Count == 0 && freezeFrames == 299
Context: picked up: freezeFrames 300
Values:
powerX.Count = 0
freezeFrames = 300 (line 968) |
Failed |
IN0
OUT0 |
| ✓ |
Hidden_WinningWhen all enemies are destroyed and none are left to come, the game is won.0 AI queries
0 tool callsHiddenTest |
Passed |
IN0
OUT0 |