public void GivePlayer(Game play)
        {
            if (play.cld[play.peek].val != 1)
            {
                kol_player += play.cld[play.peek].val;
            }
            else
            {
                kol_player += 11;
            }
            Console.WriteLine("Your Points: " + play.cld[play.peek].name + " " + play.cld[play.peek].suit + " (summa: " + kol_player + ")");
            play.bot.Num = play.cld[play.peek].val;
            play.peek++;


            while (BotControl.TakeCards(play.bot.Num, kol_player))
            {
                //Console.Write(" " + cld[peek].name + " " + cld[peek].suit);
                if (((play.cld[play.peek].val == 1) && (play.diller.kol_diller + 11 > 21)) || (play.cld[play.peek].val != 1))
                {
                    kol_player  += play.cld[play.peek].val;
                    play.bot.Num = play.cld[play.peek].val;
                    play.peek++;
                    Console.WriteLine("Your Points: " + play.cld[play.peek - 1].name + " " + play.cld[play.peek - 1].suit + " (summa: " + kol_player + ")");
                }
                else
                {
                    kol_player  += 11;
                    play.bot.Num = play.cld[play.peek].val;
                    play.peek++;
                    Console.WriteLine("Your Points: " + play.cld[play.peek - 1].name + " " + play.cld[play.peek - 1].suit + " (summa: " + kol_player + ")");
                }
            }
        }
Beispiel #2
0
        void give_player()
        {
            if (cld[peek].val != 1)
            {
                player.kol_player += cld[peek].val;
            }
            else
            {
                player.kol_player += 11;
            }
            Console.WriteLine("Your Points: " + cld[peek].name + " " + cld[peek].suit + " (summa: " + player.kol_player + ")");
            bot.num = cld[peek].val;
            peek++;


            while (BotControl.take_cards(bot.num, player.kol_player))
            {
                //Console.Write(" " + cld[peek].name + " " + cld[peek].suit);
                if (((cld[peek].val == 1) && (diller.kol_diller + 11 > 21)) || (cld[peek].val != 1))
                {
                    player.kol_player += cld[peek].val;
                    bot.num            = cld[peek].val;
                    peek++;
                    Console.WriteLine("Your Points: " + cld[peek - 1].name + " " + cld[peek - 1].suit + " (summa: " + player.kol_player + ")");
                }
                else
                {
                    player.kol_player += 11;
                    bot.num            = cld[peek].val;
                    peek++;
                    Console.WriteLine("Your Points: " + cld[peek - 1].name + " " + cld[peek - 1].suit + " (summa: " + player.kol_player + ")");
                }
            }
        }