Ejemplo n.º 1
0
 public void actualizar(chess a)
 {
     for (int i = 0; i < 8; i++)
     {
         for (int j = 0; j < 8; j++)
         {
             tab[i][j] = a.tab[i][j];
         }
     }
     juega    = a.juega;
     pmov     = a.pmov;
     inicio   = a.inicio;
     fin      = a.fin;
     ini_     = a.ini_;
     fin_     = a.fin_;
     bkcheck  = a.bkcheck;
     wkcheck  = a.wkcheck;
     bkmov    = a.bkmov;
     wkmov    = a.wkmov;
     bt1mov   = a.bt1mov;
     jugada   = a.jugada;
     wt1mov   = a.wt1mov;
     bt2mov   = a.bt2mov;
     wt2mov   = a.wt2mov;
     leng_alg = a.leng_alg;
 }
Ejemplo n.º 2
0
        public chess(chess a)
        {
            tab = new string[8][];
            for (int i = 0; i < 8; i++)
            {
                tab[i] = new string[8];
            }

            for (int i = 0; i < 8; i++)
            {
                for (int j = 0; j < 8; j++)
                {
                    tab[i][j] = a.tab[i][j];
                }
            }

            juega    = a.juega;
            pmov     = a.pmov;
            inicio   = a.inicio;
            fin      = a.fin;
            ini_     = a.ini_;
            fin_     = a.fin_;
            bkcheck  = a.bkcheck;
            wkcheck  = a.wkcheck;
            bkmov    = a.bkmov;
            wkmov    = a.wkmov;
            jugada   = 0;
            bt1mov   = a.bt1mov;
            wt1mov   = a.wt1mov;
            bt2mov   = a.bt2mov;
            wt2mov   = a.wt2mov;
            leng_alg = a.leng_alg;
        }
Ejemplo n.º 3
0
        private void Form1_Load(object sender, EventArgs e)
        {
            panel2.Location = new Point(0, -50);
            cxClient        = this.Width;
            cyClient        = this.Height;
            sizex           = cxClient - 59;
            sizey           = cyClient - 81;
            sizem           = Math.Min(sizex, sizey);
            ntl.Width       = sizem;
            ntn.Height      = sizem;
            panel1.Size     = new Size(sizem, sizem);
            panel3.Location = new Point(panel1.Width + 30 + 18, panel3.Location.Y);

            sizep = sizem / 8.0f;
            sizeb = 16.0f * sizep / 100.0f;
            sizet = 96.0f * sizep / 100.0f;

            imageList1.Images.Clear();
            for (int i = 0; i < 12; i++)
            {
                imageList1.Images.Add(Image.FromFile(rutap + pieces[i] + "1.png"));
                imageList1.Images.SetKeyName(i, pieces[i]);
            }

            List_Mov = new List <Par>();
            Ult_Mov  = new List <Par>();

            panel1.BackgroundImage = Image.FromFile(rutat + "t.jpg");

            aj  = new chess();
            laj = new LChess();
            aj.reset();
            laj.insert(aj);
            mx = my = -1;

            A = new PictureBox[8][];
            for (int i = 0; i < 8; i++)
            {
                A[i] = new PictureBox[8];
            }

            paint1();

            int[] arr = new int[4];
            arr[0] = 0;
            arr[1] = 1;
            arr[2] = 6;
            arr[3] = 7;

            for (int i = 0; i < 4; i++)
            {
                for (int j = 0; j < 8; j++)
                {
                    colocar(arr[i], j);
                }
            }
        }
Ejemplo n.º 4
0
 public void deshacer(chess a)
 {
     actualizar(a);
 }
Ejemplo n.º 5
0
 public void insert(chess a)
 {
     //algebra.Add("jugada()");
     //lchess.Push(a);
 }