You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.
When a player is invulnerable, they should not shrink upon collision with another player.
#ifdef FIX_ISSUE_382
///An invulnerable player cannot shrink
{
game g;
//Make the first player invulnerable
become_invulnerable(g.get_player(0));
// Make player 1 and 2 overlap
g.get_player(1).set_x(g.get_player(0).get_x());
g.get_player(1).set_y(g.get_player(0).get_y());
assert(has_collision(g));
// After a tick, invulnerable player does not shrink
const int inv_player_size_before = get_nth_player_size(g, 0);
g.tick();
const int inv_player_size_after = get_nth_player_size(g, 0);
assert(inv_player_size_after == inv_player_size_before);
}
#endif
The text was updated successfully, but these errors were encountered:
When a player is invulnerable, they should not shrink upon collision with another player.
The text was updated successfully, but these errors were encountered: