Example #1
0
        // 3. void ShowResults()
        public void ShowResults()
        {
            // 3.1. izvada Rezultātu - kurš uzvarēja
            int playerPoints = player.CountPoint();
            int dealerPoints = dealer.CountPoint();

            Console.WriteLine("Dīlera punkti: " + dealerPoints);
            Console.WriteLine("Spēlētāja punkti: " + playerPoints);

            if (playerPoints > 21)
            {
                Console.WriteLine("Tu zaudēji!");
            }
            else if (dealerPoints > 21)
            {
                Console.WriteLine("Tu uzvarēji!");
            }
            else if (playerPoints == dealerPoints)
            {
                Console.WriteLine("Neizšķirts");
            }
            else if (playerPoints > dealerPoints)
            {
                Console.WriteLine("Tu uzvarēji");
            }
            else
            {
                Console.WriteLine("Tu zaudēji!");
            }
        }
Example #2
0
        //3. void ShowResults()
        public void ShowResults()
        {
            int playerPoints = player.CountPoint();
            int dealerPoints = dealer.CountPoint();

            Console.WriteLine("Dilera punkti: " + dealerPoints);
            Console.WriteLine("Speletaja punkti: " + playerPoints);
            if (playerPoints > 21)
            {
                Console.WriteLine("Tu zaudeji!");
            }
            else if (dealerPoints > 21)
            {
                Console.WriteLine("Tu uzvareji!");
            }
            else if (playerPoints == dealerPoints)
            {
                Console.WriteLine("Neizshkirts!");
            }
            else if (playerPoints > dealerPoints)
            {
                Console.WriteLine("Tu uzvareji!");
            }
            else
            {
                Console.WriteLine("Tu zaudeji!");
            }
        }