File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -55,8 +55,17 @@ func (r *RobotCountHandler) handleRobotCount() {
55
55
}
56
56
}
57
57
58
- r .updateRobotCount (blueRobots , int (* r .c .lastRefereeMsg .Blue .MaxAllowedBots ), referee .Team_BLUE )
59
- r .updateRobotCount (yellowRobots , int (* r .c .lastRefereeMsg .Yellow .MaxAllowedBots ), referee .Team_YELLOW )
58
+ maxBlueRobots := int (* r .c .lastRefereeMsg .Blue .MaxAllowedBots )
59
+ maxYellowRobots := int (* r .c .lastRefereeMsg .Blue .MaxAllowedBots )
60
+
61
+ switch * r .c .lastRefereeMsg .Stage {
62
+ case referee .Referee_PENALTY_SHOOTOUT , referee .Referee_PENALTY_SHOOTOUT_BREAK :
63
+ maxBlueRobots = 2
64
+ maxYellowRobots = 2
65
+ }
66
+
67
+ r .updateRobotCount (blueRobots , maxBlueRobots , referee .Team_BLUE )
68
+ r .updateRobotCount (yellowRobots , maxYellowRobots , referee .Team_YELLOW )
60
69
}
61
70
62
71
func (r * RobotCountHandler ) updateRobotCount (robots []* tracker.TrackedRobot , maxRobots int , team referee.Team ) {
You can’t perform that action at this time.
0 commit comments