Ejemplo n.º 1
0
 public Enemy(Form1 form1, int i, Disposal Dis)
 {
     fieldLeft          = 900;
     num                = i;
     fieldTop           = 10 + 120 * num;
     trashTop           = 740;
     trashLeft          = 10 + 120 * num;
     name               = "CPU" + i;
     this.Dis           = Dis;
     ShowDeck           = new PlayCard();
     ShowDeck.Name      = "deck";
     ShowDeck.Size      = new System.Drawing.Size(70, 110);
     ShowDeck.SizeMode  = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
     ShowDeck.Image     = global::dominion.Properties.Resources.back;
     ShowDeck.Location  = new System.Drawing.Point(820, 10 + 120 * num);
     ShowTrash.Location = new System.Drawing.Point(740, 10 + 120 * num);
     ShowTrash.Name     = "trash";
     ShowTrash.Image    = global::dominion.Properties.Resources.back;
     ShowTrash.Size     = new System.Drawing.Size(70, 110);
     ShowTrash.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
     ShowTrash.TabIndex = 8;
     ShowTrash.TabStop  = false;
     ShowTrash.Visible  = false;
     p.Visible          = false;
     p.SizeMode         = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
     p.Size             = new System.Drawing.Size(70, 110);
     this.form1         = form1;
     this.form1.Controls.Add(ShowDeck);
     this.form1.Controls.Add(ShowTrash);
     this.form1.Controls.Add(p);
 }
Ejemplo n.º 2
0
 internal override void TrashCard(PlayCard p)
 {
     p.Trash(20, 540);
     ShowHand.Remove(p);
     Hand.Remove(p.Name);
     AddTrash(p.Name);
     TrashVisible();
     if (ShowHand.Count != 0)
     {
         ShowHand[0].Sort();
     }
 }
Ejemplo n.º 3
0
        internal void AddTrash(Player p)
        {
            PlayCard hoge = new PlayCard();

            hoge.Size     = new System.Drawing.Size(70, 110);
            hoge.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
            f.Controls.Add(hoge);
            hoge.Visible  = true;
            hoge.Image    = Image;
            hoge.Location = Location;
            hoge.ChangePointPara(p.trashTop, p.trashLeft);
            Count--;
            Supplycount.Text = Count.ToString();
            if (Count == 0)
            {
                Image = null;
            }
            Refresh();
            hoge.Visible = false;
            hoge.Refresh();
        }
Ejemplo n.º 4
0
 internal virtual void RemoveHandCard(PlayCard p)
 {
     ShowHand.Remove(p);
     Hand.Remove(p.Name);
 }
Ejemplo n.º 5
0
 internal virtual void TrashCard(PlayCard p)
 {
 }
Ejemplo n.º 6
0
        override internal void ShowCard(string s, int x, int y)
        {
            PlayCard a = new PlayCard();

            switch (s)
            {
            case "銅貨":
                a = new Cooper(ShowField, ShowHand, this);
                break;

            case "銀貨":
                a = new Silver(ShowField, ShowHand, this);
                break;

            case "金貨":
                a = new Gold(ShowField, ShowHand, this);
                break;

            case "屋敷":
                a = new Mansion(ShowField, ShowHand, this);
                break;

            case "公領":
                a = new Landtag(ShowField, ShowHand, this);
                break;

            case "属州":
                a = new Province(ShowField, ShowHand, this);
                break;

            case "地下貯蔵庫":
                a = new UndergroundRepository(ShowField, ShowHand, this);
                break;

            case "市場":
                a = new Market(this);
                break;

            case "民兵":
                a = new Militia(ShowField, ShowHand, this);
                break;

            case "鉱山":
                a = new Mine(ShowField, ShowHand, this);
                break;

            case "堀":
                a = new Moat(this);
                break;

            case "鍛冶屋":
                a = new Smithy(this);
                break;

            case "村":
                a = new Village(this);
                break;

            case "木こり":
                a = new Woodcutter(this);
                break;

            case "改築":
                a = new Remodel(this);
                break;

            case "工房":
                a = new Workshop(this);
                break;
            }
            a.Location = new System.Drawing.Point(x, y);
            a.Size     = new System.Drawing.Size(70, 110);
            a.Name     = s;
            a.SizeMode = PictureBoxSizeMode.StretchImage;
            a.Image    = global::dominion.Properties.Resources.back;
            form1.Controls.Add(a);
            a.BringToFront();
            ShowHand.Add(a);
            a.ChangePointPara(880 + 20 * ShowHand.Count, 10 + 120 * num);
            for (int i = 0; i < ShowHand.Count; i++)
            {
                ShowHand[i].Refresh();
            }
            ShowDeck.Refresh();
        }