Esempio n. 1
0
        public void button_reset()
        {
            aj.reset();
            //laj.reset();
            //laj.insert(aj);
            listView1.Items.Clear();

            for (int i = 0; i < 8; i++)
            {
                for (int j = 0; j < 8; j++)
                {
                    paint(i, j, "null");
                    colocar(i, j);
                }
            }

            Ult_Mov.Clear();
            mx = my = -1;

            if (Tinv)
            {
                tablero_inv();
            }
            else
            {
                actualizar();
            }
        }
Esempio n. 2
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);
                }
            }
        }