Statsbook-Tool icon indicating copy to clipboard operation
Statsbook-Tool copied to clipboard

Warn on "S" with penalty in current Jam

Open official-sounding opened this issue 5 years ago • 3 comments

Another interesting corner case found while reviewing statsbooks

A skater received a penalty in a given jam (in this case a D) and had a box trip recorded on the lineup sheet, but instead of a "-" a "S" was recorded. The current code explicitly checks for a penalty happened in the current jam, which makes sense for certain categories of penalties but not others.

I am wondering if it makes sense to add a warning in this case, or possibly a slightly smarter warning that only occurs if the code for the given penalty was one "unlikely" to result in an S in the same jam (thinking I, G, N, C probably).

official-sounding avatar Feb 24 '20 03:02 official-sounding

Just to make sure I'm understanding this right.

You're saying that an "S" recorded on the lineup sheet for a penalty committed in the same jam as it is recorded on the penalty sheet is a rarity, because it can only happen for a penalty committed between jams.

As such, you're suggesting throwing a warning, unless the penalty is one of the ones likely to happen between jams. (Misconduct, Illegal Contact, and procedural violations (I and N))

I'll have to give that a little thought - there's quite a few ways I can think of to break stuff implementing this one.

AdamSmasherDerby avatar Feb 26 '20 02:02 AdamSmasherDerby

Penalties are never served before they're committed -- I think that's the idea here? So for any penalty in jam N, an S warning in the lineup for jam N is suspect. It should be a - or an S in the following jam.

admdikramr avatar Feb 26 '20 05:02 admdikramr

The exception is penalties committed during lineups where the skater sits before the jam starts. The examples in the Statsbook manual make clear that those are to be recorded as "S".

The trick from a coding perspective is that this would be easy if skaters only got one penalty at a time, Making sure I don't bork up several penalties in a row in succeeding jams is the bit that will take some planning.

AdamSmasherDerby avatar Feb 26 '20 11:02 AdamSmasherDerby