The code has
???? for the target Y coordinate. Replace
???? with
200, then click
Run Code!
1. Silo 1 launches an interceptor towards $(170, 200)$.
2. Distance from Silo 1 $(60, 350)$ to $(170, 200)$ is $\sqrt{110^2 + (-150)^2} \approx 186\text{ px}$.
3. At speed $260\text{ px/s}$, flight time is $T \approx 0.72\text{ s}$.
4. The interceptor detonates at $(170, 200)$ into an expanding fireball ($R = 38\text{ px}$), engulfing the descending ICBM and saving City #2!
5. Challenge: Try
missile_game(2) to detonate a splitting MIRV cluster, or
missile_game(3) to practice distance optimization!