Do not generate positions close to table borders and on our side.
enable_my_square_walls(true);
enable_my_square_walls(true);
- srand((int)(robot_current_time()*1000));
- goal = (rand() % (SQ_CNTR - 5)) + 5;
+ srand((int)(robot_current_time()*10000));
+
+ do {
+ goal = (rand() % (SQ_CNTR - 5)) + 5;
+
+ } while (goal == 6 || goal == 11);
+
printf("goal %d time %f\n", goal, robot_current_time());
if (robot.team_color == RED) {
goal_x = blue_sq[goal].x;
printf("goal %d time %f\n", goal, robot_current_time());
if (robot.team_color == RED) {
goal_x = blue_sq[goal].x;