//#define FIX_ISSUE_392
#ifdef FIX_ISSUE_392
//When a player gets within the radius of food it eats it
{
game g;
food f = g.get_food()[0];
double food_radius = f.get_radius();
// Player beyond food radius should not trigger collision
put_player_near_food(g.get_player(0), f, food_radius + 1.0);
assert(!has_any_player_food_collision(g));
g.tick();
assert(has_food(g));
// Player within food radius should trigger collision
put_player_near_food(g.get_player(0), f, food_radius - 1.0);
assert(has_any_player_food_collision(g));
g.tick();
assert(!has_food(g));
assert(!has_any_player_food_collision(g));
}
//#endif
Depends on