Tier 4
Series 302
302G: The Architect's Exam
Capstone Exam
"The colony ship's systems are failing. The input is hard-wired, the weapon switching is a monolith, and the drone fabrication is scattered. Identify the three critical architectural failures to certify your status as a Systems Navigator."
Target Asset for Audit
FRAGILE_CODE_DETECTED
using UnityEngine;
public class ShipController : MonoBehaviour {
public GameObject rocketPrefab;
public GameObject laserPrefab;
public string weaponType;
void Update() {
// Audit Requirement: Lesson 302A (Command)
if (Input.GetKeyDown(KeyCode.Space)) {
Fire();
}
}
void Fire() {
// Audit Requirement: Lesson 302B (Strategy)
// Error 2: The Monolith Switch
if (weaponType == "Rocket") FireRocket();
else if (weaponType == "Laser") FireLaser();
}
void FireRocket() {
// Audit Requirement: Lesson 302C (Factory)
// Error 3: Manual Instantiation Logic
GameObject r = Instantiate(rocketPrefab);
r.GetComponent<Rocket>().Initialize();
}
}