Ejemplo n.º 1
0
 public PlayerView(Durak.Player _p)
 {
     InitializeComponent();
     _player = _p;
     foreach(Durak.objects.Card c in _player.Hand)
     {
         handVew.Controls.Add(new CardView(c));
     }
     _count = _p.Hand.Count;
     this.Paint += new PaintEventHandler(PlayerView_Paint);
 }
Ejemplo n.º 2
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;
 }
Ejemplo n.º 3
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());
         }
     }
 }