public void WinBank(DeckOfСards bank) { foreach (var card in bank.Cards) { CardsOnHand.AddCardToBotom(card); } }
public Сroupier(string nickname, int age) { NickName = nickname; Age = age; Bank = new DeckOfСards(true); Deck = new DeckOfСards(false); }
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); }
public void TekeCards(DeckOfСards cards) { CardsOnHand = cards; }