/
HockeyDrop_lax.cpp
executable file
·67 lines (64 loc) · 1.46 KB
/
HockeyDrop_lax.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#ifdef LAX
#include "HockeyDrop.h"
// ppstate: -1: full strength 0: even strength 1: vis power play 2: home power play
void HockeyDrop::ppdata(short adv, unsigned short strength, unsigned short pmin, unsigned short psec) {
if ( adv == 0 ) {
if (strength == 10) {
lines[SI_PP] = "FULL STRENGTH";
lines[SI_PP_EN] = "EMPTY NET";
settime(0,0);
ppstate = -1;
}
else {
if (strength == 9) {
lines[SI_PP] = "9-ON-9";
lines[SI_PP_EN] = "9-ON-9";
}
else if (strength == 8) {
lines[SI_PP] = "8-ON-8";
lines[SI_PP_EN] = "8-ON-8";
}
else if (strength == 7) {
lines[SI_PP] = "7-ON-7";
lines[SI_PP_EN] = "7-ON-7";
}
settime(pmin, psec);
ppstate = 0;
}
}
else if ( abs(adv) == 1 ) {
if (strength == 8) {
lines[SI_PP] = "9-ON-8";
lines[SI_PP_EN] = "9-ON-8";
}
else if (strength == 7) {
lines[SI_PP] = "8-ON-7";
lines[SI_PP_EN] = "8-ON-7";
}
else {
lines[SI_PP] = "MAN UP";
lines[SI_PP_EN] = "MAN UP";
}
}
else if ( abs(adv) == 2 ) {
if (strength == 7) {
lines[SI_PP] = "9-ON-7";
lines[SI_PP_EN] = "9-ON-7";
}
else {
lines[SI_PP] = "2 MEN UP";
lines[SI_PP_EN] = "2 MEN UP";
}
}
else if ( abs(adv) == 3 ) {
lines[SI_PP] = "3 MEN UP";
lines[SI_PP_EN] = "3 MEN UP";
}
else state = -1; // invalid case
if ( abs(adv) >= 1 ) {
settime(pmin, psec);
if (adv > 0) ppstate = 1;
else ppstate = 2;
}
}
#endif