private void Dobor() { foreach (var item in Players) { while (item.PlayerCards.Cards.Count < 3) { if (Deck.Cards.Count < 3 - item.PlayerCards.Cards.Count) { if (Deck.Cards.Count == 0) { item.PlayerCards.Add(Trump); Deck.Add(Otboy.Deal(Otboy.Cards.Count)); Deck.Mix(); } else { item.PlayerCards.Add(Deck.Deal(Deck.Cards.Count)); } } else { item.PlayerCards.Add(Deck.Deal(3 - item.PlayerCards.Cards.Count)); } } } }
public void OtboyCreate(bool playerOtb = false)//создание отбоя { List <Kard> kards = new List <Kard>(); kards.AddRange(gameField.KardBoy.Values); kards.AddRange(gameField.KardHod.Values); if (Otboy == null) { Otboy = new Otboy(); Otboy.X = 850; Otboy.Y = 200; } gameField.DelkardBoy(); gameField.DelkardHod(); if (playerOtb) { if (kards.Count > 4) { GameMessage("Было Сложно!", GameMes.MessageBot, (Bitmap)Properties.Resources.ResourceManager.GetObject("BotSmileGr")); } else { GameMessage("Легко я отбился!", GameMes.MessageBot, (Bitmap)Properties.Resources.ResourceManager.GetObject("BotSmile")); } } GetAnimateCard(gameField.X, gameField.Y, Otboy.X, Otboy.Y); Otboy.AddKard(kards); NextHod(); }
public void ToOtboy() { Otboy.Add(Table.Deal(Table.Cards.Count)); Dobor(); ActivePlayer = PassivePlayer; PassivePlayer = NextPlayer(ActivePlayer); Mover = ActivePlayer; MarkMover(Mover); ShowMessage("Otbilsa"); Refresh(); }