tresinformal / drakkar

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

The results screen knows who wins #720

Open TheoPannetier opened 1 year ago

TheoPannetier commented 1 year ago

Depends

Context

The results screen should know who wins the game and display it, so it should be able to fetch this info from the game.

Test

Below is a proposed test, feel free to adapt as necessary.

// (720) The results screen knows who is winning
{
  game_view gv;
  player &player_two = gv.get_game().get_player(1);
  player_two.grow();
  const int winner = gv.get_results_screen().get_winner();
  assert(winner == 1);
}