Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Code Style On waller-clear #2348

Merged
merged 1 commit into from
Feb 19, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions soccer/src/soccer/strategy/agent/position/defense.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ Defense::State Defense::update_state() {
switch (current_state_) {
case IDLING: {
break;
}
}
case JOINING_WALL: {
send_join_wall_request();
// SPDLOG_INFO("join wall {}", robot_id_);
next_state = WALLING;
walling_robots_ = {(u_int8_t)robot_id_};
break;
}
}
case WALLING: {
// If a wall is already full,
// Remove the robot with the highest ID from a wall
Expand All @@ -62,36 +62,36 @@ Defense::State Defense::update_state() {
next_state = STEALING;
}
break;
}
}
case SEARCHING: {
break;
}
}
case RECEIVING: {
// transition to idling if we are close enough to the ball
if (distance_to_ball < ball_receive_distance_) {
next_state = IDLING;
}
break;
}
}
case PASSING: {
// transition to idling if we no longer have the ball (i.e. it was passed or it was
// stolen)
if (check_is_done() || distance_to_ball > ball_lost_distance_) {
next_state = JOINING_WALL;
}
break;
}
}
case FACING: {
if (check_is_done()) {
next_state = IDLING;
}
}
}
case MARKING: {
if (marker_.get_target() == -1 || marker_.target_out_of_bounds(world_state)) {
next_state = ENTERING_MARKING;
}
break;
}
}
case ENTERING_MARKING: {
marker_.choose_target(world_state);
int target_id = marker_.get_target();
Expand All @@ -101,8 +101,8 @@ Defense::State Defense::update_state() {
next_state = MARKING;
}
break;
}
case STEALING: {// wall steal
}
case STEALING: { // wall steal
// Go to passing if successful
if (check_is_done()) {
send_leave_wall_request();
Expand Down