Skip to content
This repository was archived by the owner on Sep 20, 2023. It is now read-only.

The Results screen shows up when time is up, not before #719

Description

@TheoPannetier

Depends

Context

Once the results screen exists, we should make sure that it is displayed once the game is over and not before.

Test

Here is a draft for the test, please edit/complete when it is clearer what form the results screen can take.

  // (719) The results screen is displayed when time is up, not before
  {
    const int time_limit = 10;
    const game_options g_options{3,
                          false,
                          get_random_kam(),
                          get_random_kam(),
                          get_random_kam(),
                          environment_type(),
                          time_limit
                         };
    game_view gv{g_options};
    for (int i = 0; i < time_limit; i++)
      {
        assert(!gv.get_results_screen().is_visible());
        gv.get_game().tick();
      }
    assert(gv.get_results_screen().is_visible());
  }
  #endif // FIX_ISSUE_719

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    mediorSuitable for medior devs

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions