summaryrefslogtreecommitdiff
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.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/digital/io/src/food.c b/digital/io/src/food.c
index c081e4ae..3096a2ad 100644
--- a/digital/io/src/food.c
+++ b/digital/io/src/food.c
@@ -228,7 +228,7 @@ food_shorten (uint8_t food)
int16_t shorten = 0;
/* Corns. */
if (food_table[food].type == FOOD_TYPE_CORN)
- shorten = BOT_SIZE_FRONT + 50;
+ shorten = BOT_SIZE_FRONT + 70;
/* Food on playground sides. */
if (food <= 4 || (food >= 14 && food <= 18))
shorten = BOT_SIZE_FRONT;
@@ -255,3 +255,13 @@ food_taken (position_t robot_pos)
}
}
+int16_t
+food_slow_motion (uint8_t food)
+{
+ assert (food < UTILS_COUNT (food_table));
+ if (food_table[food].type == FOOD_TYPE_CORN)
+ return 50;
+ else
+ return 0;
+}
+