Beispiel #1
0
        public TableView(Table table)
        {
            _table = table;
            _curAttackCards = 0;
            _curDefenceCards = 0;
            InitializeComponent();

            this.Paint += new PaintEventHandler(TableView_Paint);
        }
Beispiel #2
0
        public MainForm()
        {
            InitializeComponent();
            t = new Table(6, Suits.Diamonds);
            while (t.CountAttackCards < 6)
            {
                t.PutToAttack(d.GiveNextCard());
            }

            _userView = new PlayerView(game.User);
            _cpuView = new PlayerView(game.Cpu);
        }
Beispiel #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());
         }
     }
 }