summaryrefslogtreecommitdiffhomepage
path: root/digital/io/src/food.c
diff options
context:
space:
mode:
Diffstat (limited to 'digital/io/src/food.c')
-rw-r--r--digital/io/src/food.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/digital/io/src/food.c b/digital/io/src/food.c
index 332b46f8..87c44b41 100644
--- a/digital/io/src/food.c
+++ b/digital/io/src/food.c
@@ -166,7 +166,7 @@ food_score (position_t robot_pos, uint8_t food)
if (food_table[food].type == FOOD_TYPE_TOMATO)
score += 100;
else
- score -= 1000;
+ score -= 4000;
/* Distance to robot. */
food_pos (food, &v);
int32_t dr = distance_point_point (&v, &robot_pos.v);
@@ -182,8 +182,10 @@ food_score (position_t robot_pos, uint8_t food)
}
/* Distance to unloading area. */
/* Avoid food near border. */
+ if (food == 15 || food == 1)
+ score -= 300;
if (v.y < BOT_SIZE_RADIUS)
- score -= 2000;
+ score -= 6000;
/* Done. */
return score;
}