Players' life or health is indicated by their size.
When players reach a certain limit size, they "die" temporarily, and can't interact with the game for some time.
{
// (606) When a player goes under some size, it is out
game g;
player p = g.get_player(0);
const double death_size = 5.0; // choose a value
// Make the player smaller
while(get_nth_player_size(g, 0) > death_size)
{
assert(!is_out(p));
p.shrink();
g.tick();
}
assert(is_out(p));
}
Players' life or health is indicated by their size. When players reach a certain limit size, they "die" temporarily, and can't interact with the game for some time.