A closed-loop cardiac-arrest simulator built on the same modeling idea used inside real high-fidelity mannequin trainers: a small hemodynamic engine (cardiac output = heart rate × stroke volume, mean arterial pressure ≈ cardiac output × systemic vascular resistance) drives four live vitals — heart rate, MAP, SpO₂ and EtCO₂ — for a schematic 2D patient and monitor in ventricular fibrillation. Start CPR and tune compression depth toward the 5–6 cm target to raise CPR quality and EtCO₂, give epinephrine to boost coronary perfusion pressure, and time a defibrillation shock once quality and energy are in your favor. Succeed and the rhythm converts to sinus with return of spontaneous circulation; neglect the arrest too long and it deteriorates into asystole, forcing a scenario reset.