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
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.