Zebra Huddleâ„¢

Non-Skating Officials => General NSO Discussion => Topic started by: xrobau on December 24, 2012, 01:08:50 am

Title: FYI: Alpha release of Penalty Timing for CRG.
Post by: xrobau on December 24, 2012, 01:08:50 am
I've spent the last couple of days putting basic penalty timing functionality into CRG. Currently it only works on CHROME (eg, recent android devices), or on chrome desktop.  It was working fine on older webkit browsers (eg, iphone), but somewhere recently it broke. I'll fix it up after xmas, but I'd love people to have a poke at it.

It implements 7.3 (including 7.3.1, 7.3.2 and 7.3.10) correctly, as far as I can tell, including multiple 2 minute penalties.

You can download the specific files to be replaced, or, my latest CRG build from here:

http://dropcanvas.com/u98jk

(This is NOT an official release, and has not been submitted for inclusion in CRG yet, this is purely for alpha testing. I'm sure there will be bugs, which is why I want people to test it!)
Title: Re: FYI: Alpha release of Penalty Timing for CRG.
Post by: Megapickle on December 24, 2012, 04:31:00 am
Thanks for this, Rob. Looks like the start of something good. To avoid cluttering ZH, I'll limit feedback to a rules-relevant bug I found.

Jammer A sits with 2 minutes (explicitly using the "2 Minutes" button"). 15 seconds later, Jammer B sits with 1 minute. Jammer B is immediately released, and Jammer A's time drops to 45 seconds. So far, so good. But if 10 seconds later, Jammer B sits again with 1 minute, it breaks down. I'm fairly certain Jammer A should be released & Jammer B should sit for 25 seconds (to match the 25 that Jammer A has served). As it stands, the program gives us a 35-second jammer-less jam, with both serving a total of 1 minute (so at least it's fair).

It behaves correctly if the initial 2-minute penalty is entered as a "1 Minute" first, then immediately bumped up with the "Add 1 Minute" button.

And there's a similar breakdown if Jammer A has more than 60 seconds remaining, and Jammer B sits with the "2 Minute" button.
Title: Re: FYI: Alpha release of Penalty Timing for CRG.
Post by: bjmacke on December 24, 2012, 11:47:01 pm
Jammer A sits with 2 minutes (explicitly using the "2 Minutes" button"). 15 seconds later, Jammer B sits with 1 minute. Jammer B is immediately released, and Jammer A's time drops to 45 seconds. So far, so good. But if 10 seconds later, Jammer B sits again with 1 minute, it breaks down. I'm fairly certain Jammer A should be released & Jammer B should sit for 25 seconds (to match the 25 that Jammer A has served). As it stands, the program gives us a 35-second jammer-less jam, with both serving a total of 1 minute (so at least it's fair).

This sounds correct, per 7.3.1:

[rule]7.3.1 - If the first penalized Jammer is sent back to the box after being released from the penalty box while the second penalized Jammer is still serving their required time, the game will continue without a Jammer on the track for the duration of any penalty time that is required to be served.

7.3.1.1 - If the jam clock expires with both Jammers in the box serving their required time, a new jam will begin without Jammers on the Jammer Line. Both Jammers will return to play following completion of any required penalty time.
[/rule]
Title: Re: FYI: Alpha release of Penalty Timing for CRG.
Post by: Megapickle on December 24, 2012, 11:57:43 pm
What sounds correct?

So much for avoiding clutter... :-/
Title: Re: FYI: Alpha release of Penalty Timing for CRG.
Post by: bjmacke on December 25, 2012, 12:00:27 am
I just re-read my cite and thought I should probably clarify it.

This could actually go both ways, and really depends on if you view the first Jammer's penalty time as divisible or not. Since penalty time for jammers is viewed as pairs of trips, the first Jammer's first minute would need to be paired with the second jammer's first penalty, and then the second minute of the first jammer would then get paired with the second jammer's second penalty. But I'm not sure if that's how multi-minute penalties would get treated in a game, since you'd be deducting time twice from a single trip.
Title: Re: FYI: Alpha release of Penalty Timing for CRG.
Post by: xrobau on December 25, 2012, 09:07:44 pm

This could actually go both ways, and really depends on if you view the first Jammer's penalty time as divisible or not.

replying from phone, as we've been off at the parents for Xmas. Everything SHOULD be being treated as sets of penalties, and it keeps track of that. But I have a sneaking suspicion that I may NOT be matching sets with the add 1 minute button.

Now that the holidays are over, I'll double check all my logic when I get home :-)

Title: Re: FYI: Alpha release of Penalty Timing for CRG.
Post by: ShoNuff on January 01, 2013, 06:41:45 pm
I just re-read my cite and thought I should probably clarify it.

This could actually go both ways, and really depends on if you view the first Jammer's penalty time as divisible or not. Since penalty time for jammers is viewed as pairs of trips, the first Jammer's first minute would need to be paired with the second jammer's first penalty, and then the second minute of the first jammer would then get paired with the second jammer's second penalty. But I'm not sure if that's how multi-minute penalties would get treated in a game, since you'd be deducting time twice from a single trip.

In the scenario Megapickle discussed, when jammer B arrived, you reduced jammer A's second penalty to zero seconds and jammer B's first penalty to zero seconds.

When Jammer B returned, jammer A's first penalty has never been shortened so it can be reduced to zero seconds and jammer B can serve an equal amount of time.

There is no requirement to balance first penalty to first penalty and second penalty to second penalty and it is not possible to do so and still follow 7.3.10. 

Since the arrival of the second jammer reduces the time remaining of the first jammer by a full minute, the second jammer's penalty must be being balanced against a penalty that the first jammer has not yet begun serving.  So jammer B's first penalty is specifically balanced against a penalty other than the first penalty of jammer A.  You can't force the penalties to be balanced in the order they are served and still follow the requirements of 7.3.10.
Title: Re: FYI: Alpha release of Penalty Timing for CRG.
Post by: molotovmuffin on February 09, 2013, 07:29:17 pm
I just re-read my cite and thought I should probably clarify it.

This could actually go both ways, and really depends on if you view the first Jammer's penalty time as divisible or not. Since penalty time for jammers is viewed as pairs of trips, the first Jammer's first minute would need to be paired with the second jammer's first penalty, and then the second minute of the first jammer would then get paired with the second jammer's second penalty. But I'm not sure if that's how multi-minute penalties would get treated in a game, since you'd be deducting time twice from a single trip.

In the scenario Megapickle discussed, when jammer B arrived, you reduced jammer A's second penalty to zero seconds and jammer B's first penalty to zero seconds.

When Jammer B returned, jammer A's first penalty has never been shortened so it can be reduced to zero seconds and jammer B can serve an equal amount of time.

There is no requirement to balance first penalty to first penalty and second penalty to second penalty and it is not possible to do so and still follow 7.3.10. 

Since the arrival of the second jammer reduces the time remaining of the first jammer by a full minute, the second jammer's penalty must be being balanced against a penalty that the first jammer has not yet begun serving.  So jammer B's first penalty is specifically balanced against a penalty other than the first penalty of jammer A.  You can't force the penalties to be balanced in the order they are served and still follow the requirements of 7.3.10.

Wouldn't jammer B have to serve 10 seconds before being released the first time and both would have to serve the full minute (or time remaining of jammer A) on jammer B's return trip.  So in effect a jammerless jam?
Title: Re: FYI: Alpha release of Penalty Timing for CRG.
Post by: The Gorram Reaver on February 11, 2013, 03:26:40 am
Wouldn't jammer B have to serve 10 seconds before being released the first time and both would have to serve the full minute (or time remaining of jammer A) on jammer B's return trip.  So in effect a jammerless jam?

No, she would not.

[rule]7.3.10 - When a penalized Jammer is serving more than one consecutive minute in the penalty box and the opposing Jammer arrives in the penalty box when the first penalized Jammer has more than a minute of penalty time remaining to serve, the arriving Jammer will be released back into play by the penalty box official immediately after taking their seat in the penalty box. The remaining penalty time of the first Jammer is reduced by one minute.[/rule]