Exemple #1
0
 public Speletajs dalitKartisSpeletajam(string name)
 {
     List<Kartis> kartissp = new List<Kartis>();
     for (int i = 0; i < 6; i++)
     {
         Kartis temp = new Kartis(kava[0].Masts, kava[0].Vertiba);
         kava.RemoveAt(0);
         kartissp.Add(temp);
     }
     Speletajs sp = new Speletajs(name, kartissp);
     return sp;
 }
Exemple #2
0
 public void dalitKartis(Speletajs s)
 {
     if (Form1.kava.Count != 0)
     {
         Kartis temp = new Kartis(Form1.kava[0].Masts, Form1.kava[0].Vertiba);
         Form1.kava.RemoveAt(0);
         s.S_kartis.Add(temp);
     }
 }
Exemple #3
0
        public SpeletajsVisual(Speletajs sp)
        {
            Label label1 = new Label();
            this.sp = sp;

            label1.Text = sp.Vards;
            int i = 0;
            foreach (Kartis item in this.sp.S_kartis)
            {
                PictureBox box = new PictureBox();
                box.Location = new Point(i * 50, 50);
                box.Image = item.Attels1;
                box.SizeMode = PictureBoxSizeMode.AutoSize;
                box.Click += new EventHandler(box_Click);
                this.Controls.Add(box);

                i++;
            }
            this.Controls.Add(label1);
            this.Enabled = this.sp.VaiAktivs;
        }