コード例 #1
0
ファイル: Сroupier.cs プロジェクト: romanchubak/gameforVova
        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);
        }
コード例 #2
0
 public void AddCardToBotom(PlayingCard card)
 {
     Cards.AddLast(card);
 }