tresinformal / drakkar

The tresinformal video game called 'Drakkar'
GNU General Public License v3.0
11 stars 4 forks source link

A player can be revived #626

Open TheoPannetier opened 2 years ago

TheoPannetier commented 2 years ago

Context

After some time, a player that has been killed should be allowed to revive and join the game again. A first step is to make a function that can revive a player.

Test

#define FIX_ISSUE_626
{
      // (626) A player that is out can be revived
    game g;
    g.kill_player(0);
    assert(is_out(g.get_player(0)));
    g.revive_player(0);
    assert(!is_out(g.get_player(0)));
}
#endif // FIX_ISSUE_626

Tip: look for the definition of kill_player()

MahshidGhods commented 1 year ago

I'm a member now.