tresinformal / drakkar

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

A player that is out cannot shoot rockets #622

Open TheoPannetier opened 1 year ago

TheoPannetier commented 1 year ago

Context

A player that has been killed and is out should not be able to interact with the game for a bit, including not shooting rockets!

Test

    // (622) A player that is out cannot shoot rockets
    game g;
    g.kill_player(0);

    g.do_action(0, action_type::shoot);
    g.tick();
    assert(count_n_projectiles(g) == 0);

    g.do_action(0, action_type::shoot_stun_rocket);
    g.tick();
    assert(count_n_projectiles(g) == 0);