Spaces:
Sleeping
Sleeping
def simulate_umpire_decision(pitch, shot, impact, trajectory_hint): | |
if pitch.lower() == "outside leg": | |
return {"decision": "NOT OUT", "reason": "Ball pitched outside leg stump"} | |
if impact.lower() == "outside off" and shot.lower() == "yes": | |
return {"decision": "NOT OUT", "reason": "Impact outside off and shot offered"} | |
if "missing" in trajectory_hint.lower(): | |
return {"decision": "NOT OUT", "reason": "Ball not likely to hit stumps"} | |
return {"decision": "OUT", "reason": "All conditions favor LBW"} | |