Beispiel #1
0
 public bool Take(Player p)
 {
     foreach (Card card in _t.AttackCards)
     {
         p.CardToHand(card);
     }
     foreach (Card card in _t.DefenceCards)
     {
         p.CardToHand(card);
     }
     _t.Clear();
     return true;
 }
Beispiel #2
0
 public UserTableManager(Player u, Player c, Deck d, Suits s, Table t, int state)
 {
     _u = u; _c = c; _d = d; _s = s; _t = t;
     end = false;
     if (state == 1)
     {
         while (_u.CardCount < 6 && !_d.isEmpty())
         {
             _u.CardToHand(_d.GiveNextCard());
         }
         while (_c.CardCount < 6 && !_d.isEmpty())
         {
             _c.CardToHand(_d.GiveNextCard());
         }
         _t.PutToAttack(_c.Hand[0]);
         _c.Hand.RemoveAt(0);
     }
     else
     {
         while (_c.CardCount < 6 && !_d.isEmpty())
         {
             _c.CardToHand(_d.GiveNextCard());
         }
         while (_c.CardCount < 6 && !_d.isEmpty())
         {
             _c.CardToHand(_d.GiveNextCard());
         }
     }
 }