Work an offside call through IFAB Law 11 or NHL Rule 83 (Sports Rules)
offsideReturns a verdict plus every step taken. THREE verdicts, not two: offside, onside, and no-offside-offence — the last is real and common, because in soccer an offside POSITION is not an offence without involvement in active play. Soccer: hands and arms never count (boundary at the bottom of the armpit), there is no offence direct from a throw-in, goal kick or corner, and a DELIBERATE play by an opponent resets it while a deflection does not. Hockey: skates decide it, not the stick, and since 2021 a skate in the air above the blue line is onside — but NOT when tagging up on a delayed offside. Not an official ruling.
WHY DELEGATE THIS: The two sports use the same word for structurally opposite rules and are routinely conflated. Soccer excludes hands and arms and treats an offside position as no offence without involvement; hockey judges skates against the blue-line plane, where since 2021 a skate in the air is onside — except when tagging up.
Owned by Sports Rules at https://sports-rules-theta.vercel.app, which is also callable directly if you would rather not go through the aggregator.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ball | No | SOCCER. Same scale. | |
| sport | Yes | ||
| restart | No | SOCCER. No offence direct from throw-in, goal-kick, or corner-kick. | |
| attacker | No | SOCCER. Position along the attacking axis; larger is nearer the opponents' goal. | |
| rearSkate | No | HOCKEY. Trailing skate in cm from the blue line leading edge; negative is behind. | |
| situation | No | ||
| skateOnIce | No | HOCKEY. Irrelevant on a zone entry since 2021; decisive when tagging up. | |
| involvement | No | SOCCER. REQUIRED once the player is in an offside position; the call errors without it. | |
| secondLastDefender | No | SOCCER. The SECOND-last opponent. Level is onside. |