Skip to content

Commit 4eb990c

Browse files
committed
Refactor code to use HeliosOffensivePlanner instead of HeliosChainAction for kickable actions
1 parent 8321d2a commit 4eb990c

File tree

4 files changed

+325
-287
lines changed

4 files changed

+325
-287
lines changed

idl/service.proto

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// version 0
1+
// version 1
22

33
syntax = "proto3";
44

@@ -83,6 +83,12 @@ enum LoggerLevel{
8383
// LEVEL_ANY = 0xffffffff;
8484
}
8585

86+
enum CardType {
87+
NO_CARD = 0;
88+
YELLOW = 1;
89+
RED = 2;
90+
}
91+
8692
message Player {
8793
RpcVector2D position = 1;
8894
RpcVector2D seen_position = 2;
@@ -153,6 +159,9 @@ message Self {
153159
ViewWidth view_width = 34;
154160
int32 type_id = 35;
155161
float kick_rate = 36;
162+
float recovery = 37;
163+
float stamina_capacity = 38;
164+
CardType card = 39;
156165
}
157166

158167
enum InterceptActionType {
@@ -256,6 +265,10 @@ message WorldModel {
256265
int32 their_team_score = 29;
257266
bool is_penalty_kick_mode = 30;
258267
map<int32, RpcVector2D> helios_home_positions = 31;
268+
double our_defense_line_x = 32;
269+
double their_defense_line_x = 33;
270+
double our_defense_player_line_x = 34;
271+
double their_defense_player_line_x = 35;
259272
}
260273

261274
message State {
@@ -750,7 +763,7 @@ message HeliosGoalieKick {}
750763

751764
message HeliosShoot {}
752765

753-
message HeliosChainAction {
766+
message HeliosOffensivePlanner {
754767
bool direct_pass = 1;
755768
bool lead_pass = 2;
756769
bool through_pass = 3;
@@ -833,7 +846,7 @@ message PlayerAction {
833846
HeliosGoalieMove helios_goalie_move = 56;
834847
HeliosGoalieKick helios_goalie_kick = 57;
835848
HeliosShoot helios_shoot = 58;
836-
HeliosChainAction helios_chain_action = 59;
849+
HeliosOffensivePlanner helios_offensive_planner = 59;
837850
HeliosBasicOffensive helios_basic_offensive = 60;
838851
HeliosBasicMove helios_basic_move = 61;
839852
HeliosSetPlay helios_set_play = 62;

server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def GetPlayerActions(self, state: pb2.State):
3434
if state.world_model.self.is_goalie:
3535
actions.append(pb2.PlayerAction(helios_goalie=pb2.HeliosGoalie()))
3636
elif state.world_model.self.is_kickable:
37-
actions.append(pb2.PlayerAction(helios_chain_action=pb2.HeliosChainAction(lead_pass=True,
37+
actions.append(pb2.PlayerAction(helios_offensive_planner=pb2.HeliosOffensivePlanner(lead_pass=True,
3838
direct_pass=True,
3939
through_pass=True,
4040
simple_pass=True,

service_pb2.py

Lines changed: 276 additions & 274 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)