tresinformal / drakkar

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

Refactor: game::get_v_player -> game::get_players #662

Closed richelbilderbeek closed 1 year ago

richelbilderbeek commented 1 year ago

Currently, the game has a member function called get_v_player that returns the players, where v stands for vector. However, NL.5: Avoid encoding type information in names, hence this should be simply renamed to get_players.

To transition, both function names will be temporarily supported:

  #ifdef FIX_ISSUE_662
  {
    const game g;
    const auto players{g.get_players()};
    const auto v_player{g.get_v_player()};
    assert(players == v_player);
  }
  #endif // FIX_ISSUE_662

If this is done, go to #663