Repository navigation
Expand file tree
/
Copy pathgame-specific.go
More file actions
107 lines (91 loc) · 3.35 KB
/
Copy pathgame-specific.go
File metadata and controls
107 lines (91 loc) · 3.35 KB
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
package otrscouting
type RobotPerformance struct {
StoppedMoving bool `json:"stopped_moving"`
NeverMoved bool `json:"never_moved"`
NoShow bool `json:"no_show"`
Defense int `json:"defense"`
}
/* 2018 Game - PowerUp END */
type PowerUpRobot struct {
TeamNumber int `json:"team_number"`
Autonomous PowerUpAuton `json:"autonomous"`
TeleOperated PowerUpTeleOp `json:"tele_operated"`
Endgame PowerUpEndgame `json:"endgame"`
OverallRobot RobotPerformance `json:"overall_robot"`
}
func (r *PowerUpRobot) Add(robot PowerUpRobot) {
r.Endgame.Add(robot.Endgame)
r.TeleOperated.Add(robot.TeleOperated)
r.Autonomous.Add(robot.Autonomous)
}
type PowerUpAuton struct {
Moved bool `json:"moved"`
SwitchAttempted int `json:"switch_attempted"`
SwitchScored int `json:"switch_scored"`
ExchangeAttempted int `json:"exchange_attempted"`
ExchangeScored int `json:"exchange_scored"`
ScaleAttempted int `json:"scale_attempted"`
ScaleScored int `json:"scale_scored"`
}
func (a *PowerUpAuton) Add(auton PowerUpAuton) {
a.ExchangeScored += auton.ExchangeScored
a.ExchangeAttempted += auton.ExchangeAttempted
a.ScaleScored += auton.ScaleScored
a.ScaleAttempted += auton.ScaleAttempted
a.SwitchScored += auton.SwitchScored
a.SwitchAttempted += auton.SwitchAttempted
}
type PowerUpTeleOp struct {
ExchangeAttempted int `json:"exchange_attempted"`
ExchangeScored int `json:"exchange_scored"`
OwnSwitchAttempted int `json:"own_switch_attempted"`
OwnSwitchScored int `json:"own_switch_scored"`
ScaleAttempted int `json:"scale_attempted"`
ScaleScored int `json:"scale_scored"`
ScaleDropped int `json:"scale_dropped"`
OppSwitchAttempted int `json:"opp_switch_attempted"`
OppSwitchScored int `json:"opp_switch_scored"`
CubesDropped int `json:"cubes_dropped"`
}
func (t *PowerUpTeleOp) Add(tele PowerUpTeleOp) {
t.ScaleAttempted += tele.ScaleAttempted
t.ScaleScored += tele.ScaleScored
t.ExchangeAttempted += tele.ExchangeAttempted
t.ExchangeScored += tele.ExchangeScored
t.CubesDropped += tele.CubesDropped
t.OppSwitchScored += tele.OppSwitchScored
t.OppSwitchAttempted += tele.OppSwitchAttempted
t.OwnSwitchScored += tele.OwnSwitchScored
t.OwnSwitchAttempted += tele.OwnSwitchAttempted
t.ScaleDropped += tele.ScaleDropped
}
type PowerUpEndgame struct {
ClimbSetupTime int `json:"climb_setup_time"`
LiftedSelf bool `json:"lifted_self"`
PartnersLifted int `json:"partners_lifted"`
Parked bool `json:"parked"`
DroppedPartner bool `json:"dropped_partner"`
LiftedByPartner bool `json:"lifted_by_partner"`
PartnersAttempted int `json:"partners_attempted"`
}
func (e *PowerUpEndgame) Add(endgame PowerUpEndgame) {
e.PartnersLifted += endgame.PartnersLifted
e.PartnersAttempted += endgame.PartnersAttempted
}
/* 2018 Game - PowerUp END */
/* 2019 Game - Destination: Deep Space */
type DeepSpaceRobot struct {
TeamNumber int `json:"team_number"`
Autonomous DeepSpaceAuton `json:"autonomous"`
TeleOperated DeepSpaceTeleOp `json:"tele_operated"`
Endgame DeepSpaceEndgame `json:"endgame"`
OverallRobot RobotPerformance `json:"overall_robot"`
}
type DeepSpaceAuton struct {
Moved bool `json:"moved"`
}
type DeepSpaceTeleOp struct {
}
type DeepSpaceEndgame struct {
}
/* 2019 Game - Destination: Deep Space END */