Ubisoft Interview Question

Write an algorithm that checks if an NPC is hit by an explosion.