示例#1
0
 public void WinBank(DeckOfСards bank)
 {
     foreach (var card in bank.Cards)
     {
         CardsOnHand.AddCardToBotom(card);
     }
 }
示例#2
0
 public Сroupier(string nickname, int age)
 {
     NickName = nickname;
     Age      = age;
     Bank     = new DeckOfСards(true);
     Deck     = new DeckOfСards(false);
 }
示例#3
0
        private string OnMove(Player player)
        {
            string      rez          = "";
            PlayingCard players_card = player.MakeMove();

            rez += player + " поклав у банк " + players_card;
            if (Bank.Cards.Count > 0 && Bank.Cards.Last.Value < players_card)
            {
                Bank.AddCardToBotom(players_card);
                rez += "\n" + player + " виграв банк: " + Bank;
                player.WinBank(Bank);
                rez += "\nу " + player + " " + player.CardsOnHand.Cards.Count + " карт";
                Bank = new DeckOfСards(true);
            }
            else
            {
                Bank.AddCardToBotom(players_card);
            }
            return(rez);
        }
示例#4
0
 public void TekeCards(DeckOfСards cards)
 {
     CardsOnHand = cards;
 }