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 eat food #621

Open TheoPannetier opened 1 year ago

TheoPannetier commented 1 year ago

Context

Once a player is out after being killed, it should not be able to interact with the game for some time. This includes not eating existing food items!

Test

// (621) A player that is out does not eat food
    game g;      
    put_player_on_food(g.get_player(0), g.get_food()[0]);
    g.kill_player(0);
    g.tick();
    assert(has_uneaten_food(g));
    assert(!has_any_player_food_collision(g));      
  }