public async Task OnCountingEnded(int playerScore, int computerScore) { UpdateCount(0); HintWindow.InsertScoreSummary(ScoreType.Count, playerScore, computerScore); await AnimateCardsBackToOwner(); }
public async Task OnUpdateScoreUi(PlayerType player, int scoreDelta, ScoreCollection scores) { await StateMachine.UiState.AddScore(player, scoreDelta); await AddToScoreHistory(GridPlayer.Items, scores, PlayerType.Player); HintWindow.InsertScoreSummary(scores.ScoreType, scoreDelta, 0); string message = String.Format("Your Score\n{0}\nHit Continue.", scores.Format(false, false, true)); //ShowHintWindowAsync(true, false, message); await HintWindow_ShowAndWait(message); }
public async Task OnComputerScoreCrib(int scoreToAdd, ScoreCollection scores) { string message = String.Format("Computer's Crib Score\n{0}\nHit Continue.", scores.Format(false, false, true)); await HintWindow_ShowAndWait(message); await StateMachine.UiState.AddScore(PlayerType.Computer, scoreToAdd); await AddToScoreHistory(GridComputer.Items, scores, PlayerType.Computer); HintWindow.InsertScoreSummary(ScoreType.Crib, 0, scoreToAdd); }