示例#1
0
 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));
             }
         }
     }
 }
示例#2
0
        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();
        }
示例#3
0
 public void ToOtboy()
 {
     Otboy.Add(Table.Deal(Table.Cards.Count));
     Dobor();
     ActivePlayer  = PassivePlayer;
     PassivePlayer = NextPlayer(ActivePlayer);
     Mover         = ActivePlayer;
     MarkMover(Mover);
     ShowMessage("Otbilsa");
     Refresh();
 }