tresinformal / drakkar

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

An options_view allows a user to modify game_options #631

Closed richelbilderbeek closed 1 year ago

richelbilderbeek commented 1 year ago

Context

The options screen (called options_view) is a dialog in which the user can specify his/her ideal preferences for the game. These preferences/settings are encapsulated in game_options. It would make sense that the options_view allows one to modify all game_options.

In this case, provide for:

Test

In options_view.cpp:

  #ifdef FIX_ISSUE_631
  // (631) An options_view allows a user to modify game_options
  {
    const game_options options;
    const options_view view(options);
    const game_options options_again(view.get_options());
    assert(options == options_again);
  }
  #endif // FIX_ISSUE_631
TheoPannetier commented 1 year ago

Done, pending the next pull request