Esempio n. 1
0
        public async Task OnGameOver(PlayerType winner, int winBy)
        {
            string message = "";



            if (winner == PlayerType.Player)
            {
                message = "Congratulations!  You won the game.";
                if (winBy > 30)
                {
                    message += "\n\nYou skunked the computer!";
                }
            }
            else
            {
                winner  = PlayerType.Computer;
                message = "Sorry, you have lost the game.\nBetter luck next time.";
                if (winBy > 30)
                {
                    message += "\n\n(You were skunked)";
                }
            }

            await AnimateAllCardsBackToDeck();

            ShowHintWindowAsync(true, false, message);

            if (winner == PlayerType.Player)
            {
                await ViewCallback.ShowSomethingFlashy();
            }


            MainPage.Current.AppBar.IsOpen = true;
        }