Spaces:
Runtime error
Runtime error
| def is_in_line(x, y, zone): | |
| return zone['x_min'] <= x <= zone['x_max'] and zone['y_min'] <= y <= zone['y_max'] | |
| def drs_decision(bounce, impact, stumps_hit): | |
| pitch_zone = {'x_min': 1.5, 'x_max': 2.5, 'y_min': 0, 'y_max': 1} # Simplified | |
| impact_zone = pitch_zone | |
| if is_in_line(*bounce, pitch_zone) and is_in_line(*impact, impact_zone) and stumps_hit: | |
| return "OUT" | |
| return "NOT OUT" | |