Building Games in SC#: Counter-Strike 2D-like top-down shooter
12 passed6 failed |
66.7% |
IN2 349 371
OUT117 379 |
| ✓ |
TopDownShooterThe model builds a top-down shooter in the style of Counter-Strike 2D 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
42 tool calls |
Passed |
IN2 349 371
OUT117 379 |
| ✓ |
Hidden_ArmorA bot bullet does 10 damage, and armor takes half of it.0 AI queries
0 tool callsHiddenTest |
Passed |
IN0
OUT0 |
| ✓ |
Hidden_BotsPatrolBots patrol: they keep moving, at most 1.5 px per frame, and never stand in a blocked position.0 AI queries
0 tool callsHiddenTest |
Passed |
IN0
OUT0 |
| × |
Hidden_BotsShootA bot that sees the player shoots at him after a reaction time of 10 to 30 frames, then every 20 to 40 frames, aiming at his center.0 AI queries
0 tool callsHiddenTestAssertion expression evaluated to false: f - lastShot >= 20 && f - lastShot <= 40
Context: frame 11: 1 frames after the previous shot (line 1049) |
Failed |
IN0
OUT0 |
| × |
Hidden_BulletsStopWalls and crates stop bullets.0 AI queries
0 tool callsHiddenTestAssertion expression evaluated to false: bulletX.Count == 1 && Hidden_Near(bulletX[0], 300)
Context: the bullet flies on: 0 bullets
Values:
bulletX.Count = 0 (line 952) |
Failed |
IN0
OUT0 |
| × |
Hidden_FiringSpace fires a pistol bullet from 8 px in front of the player at 8 px per frame; the next shot comes 8 frames later; with no ammo nothing is fired.0 AI queries
0 tool callsHiddenTestAssertion expression evaluated to false: bulletX.Count == 1 && Hidden_Near(bulletX[0], 108) && Hidden_Near(bulletY[0], 100) && bulletOwner[0] == 0
Context: a bullet in front of the player
Values:
bulletX.Count = 1
bulletOwner[0] = 0 (line 906) |
Failed |
IN0
OUT0 |
| ✓ |
Hidden_HittingBotsA pistol bullet takes 20 health from a bot; a bot without health is removed, and without bots the round is won.0 AI queries
0 tool callsHiddenTest |
Passed |
IN0
OUT0 |
| ✓ |
Hidden_InitialStateAfter AppInit the map, the player, the bots, the pickups and the counters have their starting values.0 AI queries
0 tool callsHiddenTest |
Passed |
IN0
OUT0 |
| ✓ |
Hidden_LosingARoundWhen the player's health drops to 0 the round is lost; the next round starts without armor and with the pistol.0 AI queries
0 tool callsHiddenTest |
Passed |
IN0
OUT0 |
| ✓ |
Hidden_MovingThe player moves 2 px per frame in 8 directions, diagonals included.0 AI queries
0 tool callsHiddenTest |
Passed |
IN0
OUT0 |
| ✓ |
Hidden_NoLineOfSightA bot never shoots without line of sight: a wall between them blocks it.0 AI queries
0 tool callsHiddenTest |
Passed |
IN0
OUT0 |
| × |
Hidden_PickupsPickups are taken only when they help: health +50 up to 100, armor to 100.0 AI queries
0 tool callsHiddenTestAssertion expression evaluated to false: pickupX.Count == 1
Context: full health: the pickup stays
Values:
pickupX.Count = 0 (line 1093) |
Failed |
IN0
OUT0 |
| ✓ |
Hidden_ReloadingR reloads the pistol in 45 frames; during the reload the player cannot fire; R does nothing with a full magazine.0 AI queries
0 tool callsHiddenTest |
Passed |
IN0
OUT0 |
| ✓ |
Hidden_RifleThe rifle fires every 3 frames, does 30 damage and reloads in 75 frames.0 AI queries
0 tool callsHiddenTest |
Passed |
IN0
OUT0 |
| × |
Hidden_ScreenShowsTheMapThe screen shows the map tiles, the pickups, the bots, the player and the texts.0 AI queries
0 tool callsHiddenTestAssertion expression evaluated to false: player.Found && Math.Abs(player.X + player.Width / 2.0 - 24) <= 2 && Math.Abs(player.Y + player.Height / 2.0 - 40) <= 2
Context: the player around (0, 0)
Values:
player.Found = false (line 1255) |
Failed |
IN0
OUT0 |
| × |
Hidden_ShopIn the shop, 1 buys armor for 200 and 2 the rifle for 400; after a won round armor and weapon stay.0 AI queries
0 tool callsHiddenTestAssertion expression evaluated to false: round == 2 && !inShop && weapon == 1 && armor == 50 && ammo == 30 && health == 100
Context: the next round after a win keeps armor and the rifle
Values:
round = 2
weapon = 1
armor = 50
ammo = 12
inShop = false
health = 100 (line 1166) |
Failed |
IN0
OUT0 |
| ✓ |
Hidden_TurningZ and X turn the aim by 6 degrees per frame, kept between 0 and 360.0 AI queries
0 tool callsHiddenTest |
Passed |
IN0
OUT0 |
| ✓ |
Hidden_WallsAndSlidingWalls stop the player; moving at a slant into a wall slides along it.0 AI queries
0 tool callsHiddenTest |
Passed |
IN0
OUT0 |