- return err;
-}
-
-/* escape from zone, and don't brake, so we can continue with another
- * traj */
-uint8_t strat_escape(struct build_zone *zone, uint8_t flags)
-{
- uint8_t err;
- uint16_t old_spdd, old_spda;
-
- strat_get_speed(&old_spdd, &old_spda);
-
- err = WAIT_COND_OR_TIMEOUT(!opponent_is_behind(), 1000);
- if (err == 0) {
- strat_set_speed(SPEED_DIST_VERY_SLOW, SPEED_ANGLE_FAST);
- trajectory_d_rel(&mainboard.traj, -150);
- err = wait_traj_end(TRAJ_FLAGS_SMALL_DIST);
- strat_set_speed(old_spdd, old_spda);
- return err;
- }
-
- strat_set_speed(SPEED_DIST_FAST, SPEED_ANGLE_FAST);
-
- if (zone->flags & ZONE_F_DISC) {
- trajectory_d_rel(&mainboard.traj, -350);
- err = WAIT_COND_OR_TRAJ_END(!robot_is_near_disc(), flags);
- }
- else {
- trajectory_d_rel(&mainboard.traj, -300);
- err = wait_traj_end(flags);
- }
-
- strat_set_speed(old_spdd, old_spda);
- if (err == 0)
- return END_NEAR;