tresinformal / drakkar

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

Class `about` keeps track of the game version #596

Open TheoPannetier opened 1 year ago

TheoPannetier commented 1 year ago

Users should be able to read which release of the game they are playing, for example v2.0.1. We should have the game keep this info in class about (later, we can display this on screen via about_view).

I have made a test to enforce this:

  #ifdef FIX_ISSUE_596
  // (596) The About object keeps track of the game version
  {
    about ab;
    std::vector<std::string> version;
    version = ab.get_version();
  }
#endif

The test simply enforces that class about does contain a member function that returns a string, so your goal is to:

  1. create this member function get_version()
  2. ensure it returns a string

Of course, please make the string the current version of the game. You can find the version here in the release tab.

You'll probably need to know the basics of how a class works. If you don't, ask a more experienced member for help :) Another solution is to look at other already existing cases, e.g. I suggest simply copy-pasting and editing about::get_link_discord() 😉