示例#1
0
        private void selectCrownOptions()
        {
            Button b;

            for (int x = 0; x < 8; x++)
            {
                y         += 55;
                b          = new Button();
                b.Location = new Point(y, 55);
                b.Size     = new Size(50, 50);

                Player p = getPlayer();
                b.Text   = r.name;
                b.Click += delegate(object sender, EventArgs e){
                    if (p.crown_index2 == -1)
                    {
                        p.crown_index2 = x;
                        return;
                    }

                    if (p.crown_index1 == -1)
                    {
                        p.crown_index1 = x;
                        ActionCard r = game.getCurrentPlayer().selected;
                        TheCrown   c = (TheCrown)r;
                        c.setTarget(p.crown_index1, c.crown_index2);
                        return;
                    }
                };

                Controls.Add(b);
            }
        }
示例#2
0
        private void submitAction(object sender, EventArgs e)
        {
            ActionCard r = game.getCurrentPlayer().selected;

            r.playCard();
            game.getCurrentPlayer().resetCached();
        }
示例#3
0
 public void addActionCard(ActionCard card)
 {
     actionCards.Add(card);
 }