tresinformal / drakkar

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

Food item's state can be accessed easily #403

Closed TheoPannetier closed 2 years ago

TheoPannetier commented 2 years ago

It would be nice to have a a shorthand function to return some food item's state directly Said function should be a simple wrapper around g.get_food[n].is_eaten() :)

// #define FIX_ISSUE_403
  #ifdef FIX_ISSUE_403
  {
    // Food item's state can be accessed easily
    game g;
    assert(!is_nth_food_eaten(g, 0));
    eat_nth_food(g, 0);
    assert(is_nth_food_eaten(g, 0));
  }
  #endif
TheoPannetier commented 2 years ago

Done!