summaryrefslogtreecommitdiff
path: root/digital/io
diff options
context:
space:
mode:
Diffstat (limited to 'digital/io')
-rw-r--r--digital/io/src/food.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/digital/io/src/food.c b/digital/io/src/food.c
index ab81a6a8..20f22296 100644
--- a/digital/io/src/food.c
+++ b/digital/io/src/food.c
@@ -193,6 +193,9 @@ food_score (position_t robot_pos, uint8_t food)
score -= 300;
if (v.y < BOT_SIZE_RADIUS)
score -= 500;
+ /* Avoid food near ISEP robot. */
+ if ((bot_color && food <= 4) || (!bot_color && food >= 14 && food <= 18))
+ score -= 2000;
/* Done. */
return score;
}