private async Task PlayGameAsync(GameHistoryEntryViewModel gameHistoryEntry)
        {
            RoundResult result;

            do
            {
                result = await Game.PerformNextRoundAsync();

                OutputText += result.OutputText;

                foreach (var roundPartialHistory in result.History)
                {
                    gameHistoryEntry.History.Add(roundPartialHistory);
                }
            } while (!result.IsFinished && IsGameInProgress && !IsGamePaused);

            if (result.IsFinished)
            {
                Elimination.SetLastDuelResult(result.FinalResult);
                ScoreList.SaveScore(result.FinalResult);
                GameOverTextVisibility = Visibility.Visible;
            }
        }
Beispiel #2
0
 public async Task MakeEndGameConfiguration(RoundResult result)
 {
     Elimination.SetLastDuelResult(result.FinalResult);
     ScoreList.SaveScore(result.FinalResult);
     await SetArenaMessage(ArenaMessageHelper.GetEndGameMessage(result.FinalResult));
 }