Spaces:
Sleeping
Sleeping
File size: 543 Bytes
4b94bfa |
1 2 3 4 5 6 7 8 9 10 11 12 |
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"}
|