Beispiel #1
0
        public void cub(ref tetris CUB)
        {
            CUB.move1 = 4;
            CUB.move2 = 5;

            CUB.n = 0;
            CUB.m = 1;
            CUB.color = 1;
            CUB.arrayPole.SetValue(color, n, move1);
            CUB.arrayPole.SetValue(color, n, move2);
            CUB.arrayPole.SetValue(color, m, move1);
            CUB.arrayPole.SetValue(color, m, move2);
        }
Beispiel #2
0
 public void columna(ref tetris col)
 {
     col.move1 = 5;
      col.move2 = 5;
      col.move3 = 5;
      col.move4 = 5;
      col.n = 0;
      col.m = 1;
      col.N = 2;
      col.M = 3;
      col.color = 1;
      col.arrayPole.SetValue(color, n, col.move1);
      col.arrayPole.SetValue(color, m, col.move2);
      col.arrayPole.SetValue(color, N, col.move3);
      col.arrayPole.SetValue(color, M, col.move4);
 }
Beispiel #3
0
        public void createNewObject(ref tetris tet)
        {
            Random rnd = new Random();
               figura = rnd.Next(1,8);

               if (count==0|tet.nextFigura==false)
               {
               count = count+1;
               if (figura == 1) { cub(ref tet); tet.FIG = 1; tet.position = 1; }
               if (figura == 2) { columna(ref tet); tet.FIG = 2; tet.position = 1; }
               if (figura == 3) { triangle(ref tet); tet.FIG = 3; tet.position = 1; }
               if (figura == 4) { S_figura(ref tet); tet.FIG = 4; tet.position = 1; }
               if (figura == 5) { Z_figura(ref tet); tet.FIG = 5; tet.position = 1; }
               if (figura == 6) { J_figura(ref tet); tet.FIG = 6; tet.position = 1; }
               if (figura == 7) { L_figura(ref tet); tet.FIG = 7; tet.position = 1; }
               }
        }
Beispiel #4
0
        public void fastMoveDown(ref tetris fast)
        {
            fast.permissionmoveDown = false;

            if (fast.FIG == 1)
            {
                for (int F = 0; F < 20; F++)
                {
                    if (fast.m < 19 && fast.arrayPole[fast.line = m + 1, fast.move1] != 1

                        && fast.arrayPole[fast.line1 = m + 1, fast.move2] != 1)
                    {

                        fast.arrayPole.SetValue(color = 0, n, move1);
                        fast.arrayPole.SetValue(color = 0, n, move2);
                        fast.arrayPole.SetValue(color = 0, m, move1);
                        fast.arrayPole.SetValue(color = 0, m, move2);

                        fast.n = fast.n + 1;
                        fast.m = fast.m + 1;

                        fast.arrayPole.SetValue(color = 1, n, move1);
                        fast.arrayPole.SetValue(color = 1, n, move2);
                        fast.arrayPole.SetValue(color = 1, m, move1);
                        fast.arrayPole.SetValue(color = 1, m, move2);

                        fast.nextFigura = true;

                    }

                    else { fast.nextFigura = false; }
                }

            }

            if (fast.FIG == 2 && fast.position == 1)
            {

                for (int f = 0; f < 20; f++)
                {
                    if (fast.M < 19 && fast.arrayPole[fast.line = M + 1, fast.colom = fast.move4] != 1
                      )
                    {
                        fast.arrayPole.SetValue(color = 0, n, move1);
                        fast.arrayPole.SetValue(color = 0, m, move2);
                        fast.arrayPole.SetValue(color = 0, N, move3);
                        fast.arrayPole.SetValue(color = 0, M, move4);

                        fast.n = fast.n + 1;
                        fast.m = fast.m + 1;
                        fast.N = fast.N + 1;
                        fast.M = fast.M + 1;

                        fast.arrayPole.SetValue(color = 1, n, fast.move1);
                        fast.arrayPole.SetValue(color = 1, m, fast.move2);
                        fast.arrayPole.SetValue(color = 1, N, fast.move3);
                        fast.arrayPole.SetValue(color = 1, M, fast.move4);
                        fast.nextFigura = true;

                    }
                    else { fast.nextFigura = false; }
                }

            }

            if (fast.FIG == 2 && fast.position == 2)
            {

                for (int ff = 0; ff < 20; ff++)
                {
                    if (fast.M < 19 && fast.arrayPole[fast.line = M + 1, fast.colom = fast.move4] != 1
                          && fast.arrayPole[fast.line = N + 1, fast.colom = fast.move3] != 1
                        && fast.arrayPole[fast.line = m + 1, fast.colom = fast.move2] != 1
                        && fast.arrayPole[fast.line = n + 1, fast.colom = fast.move1] != 1)
                    {
                        fast.arrayPole.SetValue(color = 0, n, move1);
                        fast.arrayPole.SetValue(color = 0, m, move2);
                        fast.arrayPole.SetValue(color = 0, N, move3);
                        fast.arrayPole.SetValue(color = 0, M, move4);

                        fast.n = fast.n + 1;
                        fast.m = fast.m + 1;
                        fast.N = fast.N + 1;
                        fast.M = fast.M + 1;

                        fast.arrayPole.SetValue(color = 1, n, fast.move1);
                        fast.arrayPole.SetValue(color = 1, m, fast.move2);
                        fast.arrayPole.SetValue(color = 1, N, fast.move3);
                        fast.arrayPole.SetValue(color = 1, M, fast.move4);
                        fast.nextFigura = true;

                    }
                    else { fast.nextFigura = false; }
                }

            }
            if (fast.FIG == 3 && fast.position == 1)
            {
                for (int f = 0; f < 20; f++)
                {
                    if (fast.N < 19 && fast.arrayPole[fast.line = N + 1, fast.colom = fast.move3] != 1
                        && fast.arrayPole[fast.line = M + 1, fast.colom = fast.move4] != 1)
                    {
                        fast.arrayPole.SetValue(color = 0, n, move1);
                        fast.arrayPole.SetValue(color = 0, m, move2);
                        fast.arrayPole.SetValue(color = 0, N, move3);
                        fast.arrayPole.SetValue(color = 0, M, move4);

                        fast.n = fast.n + 1;
                        fast.m = fast.m + 1;
                        fast.N = fast.N + 1;
                        fast.M = fast.M + 1;

                        fast.arrayPole.SetValue(color = 1, n, fast.move1);
                        fast.arrayPole.SetValue(color = 1, m, fast.move2);
                        fast.arrayPole.SetValue(color = 1, N, fast.move3);
                        fast.arrayPole.SetValue(color = 1, M, fast.move4);
                        fast.nextFigura = true;
                    }
                    else { fast.nextFigura = false; }
                }
            }

            if (fast.FIG == 3 && fast.position == 2)
            {
                for (int f = 0; f < 20; f++)
                {
                    if (fast.N < 19
                        && fast.arrayPole[fast.line = fast.N + 1, fast.move3] != 1
                        && fast.arrayPole[fast.line = fast.M + 1, fast.move4] != 1
                         && fast.arrayPole[fast.line1 = fast.n + 1, fast.move1] != 1)
                    {
                        fast.arrayPole.SetValue(color = 0, n, move1);
                        fast.arrayPole.SetValue(color = 0, m, move2);
                        fast.arrayPole.SetValue(color = 0, N, move3);
                        fast.arrayPole.SetValue(color = 0, M, move4);

                        fast.n = fast.n + 1;
                        fast.m = fast.m + 1;
                        fast.N = fast.N + 1;
                        fast.M = fast.M + 1;

                        fast.arrayPole.SetValue(color = 1, n, fast.move1);
                        fast.arrayPole.SetValue(color = 1, m, fast.move2);
                        fast.arrayPole.SetValue(color = 1, N, fast.move3);
                        fast.arrayPole.SetValue(color = 1, M, fast.move4);
                        fast.nextFigura = true;
                    }
                    else { fast.nextFigura = false; }
                }
            }
            if (fast.FIG == 3 && fast.position == 3)
            {
                for (int f = 0; f < 20; f++)
                {
                    if (fast.N < 19 && fast.arrayPole[fast.line = fast.N + 1, fast.colom = fast.move3] != 1
                        && fast.arrayPole[fast.line1 = fast.n + 1, fast.move1] != 1)
                    {
                        fast.arrayPole.SetValue(color = 0, n, move1);
                        fast.arrayPole.SetValue(color = 0, m, move2);
                        fast.arrayPole.SetValue(color = 0, N, move3);
                        fast.arrayPole.SetValue(color = 0, M, move4);

                        fast.n = fast.n + 1;
                        fast.m = fast.m + 1;
                        fast.N = fast.N + 1;
                        fast.M = fast.M + 1;

                        fast.arrayPole.SetValue(color = 1, n, fast.move1);
                        fast.arrayPole.SetValue(color = 1, m, fast.move2);
                        fast.arrayPole.SetValue(color = 1, N, fast.move3);
                        fast.arrayPole.SetValue(color = 1, M, fast.move4);
                        fast.nextFigura = true;
                    }
                    else { fast.nextFigura = false; }
                }
            }

            if (fast.FIG == 3 && fast.position == 4)
            {
                for (int f = 0; f < 20; f++)
                {
                    if (fast.N < 19 && fast.arrayPole[fast.line = fast.N + 1, fast.colom = fast.move3] != 1
                        && fast.arrayPole[fast.line1 = fast.n + 1, fast.move1] != 1
                        && fast.arrayPole[fast.line1 = fast.m + 1, fast.move2] != 1)
                    {
                        fast.arrayPole.SetValue(color = 0, n, move1);
                        fast.arrayPole.SetValue(color = 0, m, move2);
                        fast.arrayPole.SetValue(color = 0, N, move3);
                        fast.arrayPole.SetValue(color = 0, M, move4);

                        fast.n = fast.n + 1;
                        fast.m = fast.m + 1;
                        fast.N = fast.N + 1;
                        fast.M = fast.M + 1;

                        fast.arrayPole.SetValue(color = 1, n, fast.move1);
                        fast.arrayPole.SetValue(color = 1, m, fast.move2);
                        fast.arrayPole.SetValue(color = 1, N, fast.move3);
                        fast.arrayPole.SetValue(color = 1, M, fast.move4);
                        fast.nextFigura = true;
                    }
                    else { fast.nextFigura = false; }
                }
            }
            if (fast.FIG == 4 && fast.position == 1)
            {
                for (int f = 0; f < 20; f++)
                {
                    if (fast.M < 19 && fast.arrayPole[fast.line = fast.M + 1, fast.colom = fast.move4] != 1
                       && fast.arrayPole[fast.line1 = fast.m + 1, fast.move2] != 1)
                    {
                        fast.arrayPole.SetValue(color = 0, n, move1);
                        fast.arrayPole.SetValue(color = 0, m, move2);
                        fast.arrayPole.SetValue(color = 0, N, move3);
                        fast.arrayPole.SetValue(color = 0, M, move4);

                        fast.n = fast.n + 1;
                        fast.m = fast.m + 1;
                        fast.N = fast.N + 1;
                        fast.M = fast.M + 1;

                        fast.arrayPole.SetValue(color = 1, n, fast.move1);
                        fast.arrayPole.SetValue(color = 1, m, fast.move2);
                        fast.arrayPole.SetValue(color = 1, N, fast.move3);
                        fast.arrayPole.SetValue(color = 1, M, fast.move4);
                        fast.nextFigura = true;
                    }
                    else { fast.nextFigura = false; }
                }
            }
            if (fast.FIG == 4 && fast.position == 2)
            {
                for (int f = 0; f < 20; f++)
                {
                    if (fast.N < 19 && fast.arrayPole[fast.line = fast.N + 1, fast.colom = fast.move3] != 1
                       && fast.arrayPole[fast.line1 = fast.m + 1, fast.move2] != 1
                         && fast.arrayPole[fast.line1 = fast.n + 1, fast.move1] != 1)
                    {
                        fast.arrayPole.SetValue(color = 0, n, move1);
                        fast.arrayPole.SetValue(color = 0, m, move2);
                        fast.arrayPole.SetValue(color = 0, N, move3);
                        fast.arrayPole.SetValue(color = 0, M, move4);

                        fast.n = fast.n + 1;
                        fast.m = fast.m + 1;
                        fast.N = fast.N + 1;
                        fast.M = fast.M + 1;

                        fast.arrayPole.SetValue(color = 1, n, fast.move1);
                        fast.arrayPole.SetValue(color = 1, m, fast.move2);
                        fast.arrayPole.SetValue(color = 1, N, fast.move3);
                        fast.arrayPole.SetValue(color = 1, M, fast.move4);
                        fast.nextFigura = true;
                    }
                    else { fast.nextFigura = false; }
                }
            }
            if (fast.FIG == 5 && fast.position == 1)
            {
                for (int f = 0; f < 20; f++)
                {
                    if (fast.M < 19 && fast.arrayPole[fast.line = fast.M + 1, fast.colom = fast.move4] != 1
                       && fast.arrayPole[fast.line1 = fast.m + 1, fast.move2] != 1)
                    {
                        fast.arrayPole.SetValue(color = 0, n, move1);
                        fast.arrayPole.SetValue(color = 0, m, move2);
                        fast.arrayPole.SetValue(color = 0, N, move3);
                        fast.arrayPole.SetValue(color = 0, M, move4);

                        fast.n = fast.n + 1;
                        fast.m = fast.m + 1;
                        fast.N = fast.N + 1;
                        fast.M = fast.M + 1;

                        fast.arrayPole.SetValue(color = 1, n, fast.move1);
                        fast.arrayPole.SetValue(color = 1, m, fast.move2);
                        fast.arrayPole.SetValue(color = 1, N, fast.move3);
                        fast.arrayPole.SetValue(color = 1, M, fast.move4);
                        fast.nextFigura = true;
                    }
                    else { fast.nextFigura = false; }
                }
            }
            if (fast.FIG == 5 && fast.position == 2)
            {
                for (int f = 0; f < 20; f++)
                {
                    if (fast.N < 19 && fast.arrayPole[fast.line = fast.N + 1, fast.colom = fast.move3] != 1
                       && fast.arrayPole[fast.line1 = fast.m + 1, fast.move2] != 1
                       && fast.arrayPole[fast.line1 = fast.n + 1, fast.move1] != 1)
                    {
                        fast.arrayPole.SetValue(color = 0, n, move1);
                        fast.arrayPole.SetValue(color = 0, m, move2);
                        fast.arrayPole.SetValue(color = 0, N, move3);
                        fast.arrayPole.SetValue(color = 0, M, move4);

                        fast.n = fast.n + 1;
                        fast.m = fast.m + 1;
                        fast.N = fast.N + 1;
                        fast.M = fast.M + 1;

                        fast.arrayPole.SetValue(color = 1, n, fast.move1);
                        fast.arrayPole.SetValue(color = 1, m, fast.move2);
                        fast.arrayPole.SetValue(color = 1, N, fast.move3);
                        fast.arrayPole.SetValue(color = 1, M, fast.move4);
                        fast.nextFigura = true;
                    }
                    else { fast.nextFigura = false; }
                }
            }
            if (fast.FIG == 6 && fast.position == 1)
            {
                for (int f = 0; f < 20; f++)
                {
                    if (fast.N < 19
                        && fast.arrayPole[fast.line = fast.N + 1, fast.colom = fast.move3] != 1
                        && fast.arrayPole[fast.line1 = fast.M + 1, fast.move4] != 1)
                    {
                        fast.arrayPole.SetValue(color = 0, n, move1);
                        fast.arrayPole.SetValue(color = 0, m, move2);
                        fast.arrayPole.SetValue(color = 0, N, move3);
                        fast.arrayPole.SetValue(color = 0, M, move4);

                        fast.n = fast.n + 1;
                        fast.m = fast.m + 1;
                        fast.N = fast.N + 1;
                        fast.M = fast.M + 1;

                        fast.arrayPole.SetValue(color = 1, n, fast.move1);
                        fast.arrayPole.SetValue(color = 1, m, fast.move2);
                        fast.arrayPole.SetValue(color = 1, N, fast.move3);
                        fast.arrayPole.SetValue(color = 1, M, fast.move4);
                        fast.nextFigura = true;
                    }
                    else { fast.nextFigura = false; }
                }
            }

            if (fast.FIG == 6 && fast.position == 2)
            {
                for (int f = 0; f < 20; f++)
                {
                    if (fast.n < 19
                        && fast.arrayPole[fast.line = fast.n + 1, fast.colom = fast.move1] != 1
                        && fast.arrayPole[fast.line = fast.N + 1, fast.colom = fast.move3] != 1
                        && fast.arrayPole[fast.line1 = fast.M + 1, fast.move4] != 1)
                    {
                        fast.arrayPole.SetValue(color = 0, n, move1);
                        fast.arrayPole.SetValue(color = 0, m, move2);
                        fast.arrayPole.SetValue(color = 0, N, move3);
                        fast.arrayPole.SetValue(color = 0, M, move4);

                        fast.n = fast.n + 1;
                        fast.m = fast.m + 1;
                        fast.N = fast.N + 1;
                        fast.M = fast.M + 1;

                        fast.arrayPole.SetValue(color = 1, n, fast.move1);
                        fast.arrayPole.SetValue(color = 1, m, fast.move2);
                        fast.arrayPole.SetValue(color = 1, N, fast.move3);
                        fast.arrayPole.SetValue(color = 1, M, fast.move4);
                        fast.nextFigura = true;
                    }
                    else { fast.nextFigura = false; }
                }
            }
            if (fast.FIG == 6 && fast.position == 3)
            {
                for (int f = 0; f < 20; f++)
                {
                    if (fast.n < 19
                        && fast.arrayPole[fast.line = fast.n + 1, fast.colom = fast.move1] != 1

                        && fast.arrayPole[fast.line1 = fast.m + 1, fast.move2] != 1)
                    {
                        fast.arrayPole.SetValue(color = 0, n, move1);
                        fast.arrayPole.SetValue(color = 0, m, move2);
                        fast.arrayPole.SetValue(color = 0, N, move3);
                        fast.arrayPole.SetValue(color = 0, M, move4);

                        fast.n = fast.n + 1;
                        fast.m = fast.m + 1;
                        fast.N = fast.N + 1;
                        fast.M = fast.M + 1;

                        fast.arrayPole.SetValue(color = 1, n, fast.move1);
                        fast.arrayPole.SetValue(color = 1, m, fast.move2);
                        fast.arrayPole.SetValue(color = 1, N, fast.move3);
                        fast.arrayPole.SetValue(color = 1, M, fast.move4);
                        fast.nextFigura = true;
                    }
                    else { fast.nextFigura = false; }
                }
            }

            if (fast.FIG == 6 && fast.position == 4)
            {
                for (int f = 0; f < 20; f++)
                {
                    if (fast.N < 19
                        && fast.arrayPole[fast.line = fast.N + 1, fast.colom = fast.move3] != 1
                       && fast.arrayPole[fast.line1 = fast.m + 1, fast.move2] != 1
                       && fast.arrayPole[fast.line1 = fast.M + 1, fast.move4] != 1)
                    {
                        fast.arrayPole.SetValue(color = 0, n, move1);
                        fast.arrayPole.SetValue(color = 0, m, move2);
                        fast.arrayPole.SetValue(color = 0, N, move3);
                        fast.arrayPole.SetValue(color = 0, M, move4);

                        fast.n = fast.n + 1;
                        fast.m = fast.m + 1;
                        fast.N = fast.N + 1;
                        fast.M = fast.M + 1;

                        fast.arrayPole.SetValue(color = 1, n, fast.move1);
                        fast.arrayPole.SetValue(color = 1, m, fast.move2);
                        fast.arrayPole.SetValue(color = 1, N, fast.move3);
                        fast.arrayPole.SetValue(color = 1, M, fast.move4);
                        fast.nextFigura = true;
                    }
                    else { fast.nextFigura = false; }
                }
            }
            if (fast.FIG == 7 && fast.position == 1)
            {
                for (int f = 0; f < 20; f++)
                {
                    if (fast.N < 19
                        && fast.arrayPole[fast.line = fast.N + 1, fast.colom = fast.move3] != 1
                        && fast.arrayPole[fast.line1 = fast.M + 1, fast.move4] != 1)
                    {
                        fast.arrayPole.SetValue(color = 0, n, move1);
                        fast.arrayPole.SetValue(color = 0, m, move2);
                        fast.arrayPole.SetValue(color = 0, N, move3);
                        fast.arrayPole.SetValue(color = 0, M, move4);

                        fast.n = fast.n + 1;
                        fast.m = fast.m + 1;
                        fast.N = fast.N + 1;
                        fast.M = fast.M + 1;

                        fast.arrayPole.SetValue(color = 1, n, fast.move1);
                        fast.arrayPole.SetValue(color = 1, m, fast.move2);
                        fast.arrayPole.SetValue(color = 1, N, fast.move3);
                        fast.arrayPole.SetValue(color = 1, M, fast.move4);
                        fast.nextFigura = true;
                    }
                    else { fast.nextFigura = false; }
                }
            }
            if (fast.FIG == 7 && fast.position == 2)
            {
                for (int f = 0; f < 20; f++)
                {
                    if (fast.N < 19
                        && fast.arrayPole[fast.line = fast.N + 1, fast.colom = fast.move3] != 1
                        && fast.arrayPole[fast.line1 = fast.m + 1, fast.move2] != 1
                         && fast.arrayPole[fast.line1 = fast.n + 1, fast.move1] != 1)
                    {
                        fast.arrayPole.SetValue(color = 0, n, move1);
                        fast.arrayPole.SetValue(color = 0, m, move2);
                        fast.arrayPole.SetValue(color = 0, N, move3);
                        fast.arrayPole.SetValue(color = 0, M, move4);

                        fast.n = fast.n + 1;
                        fast.m = fast.m + 1;
                        fast.N = fast.N + 1;
                        fast.M = fast.M + 1;

                        fast.arrayPole.SetValue(color = 1, n, fast.move1);
                        fast.arrayPole.SetValue(color = 1, m, fast.move2);
                        fast.arrayPole.SetValue(color = 1, N, fast.move3);
                        fast.arrayPole.SetValue(color = 1, M, fast.move4);
                        fast.nextFigura = true;
                    }
                    else { fast.nextFigura = false; }
                }
            }
            if (fast.FIG == 7 && fast.position == 3)
            {
                for (int f = 0; f < 20; f++)
                {
                    if (fast.N < 19
                        && fast.arrayPole[fast.line = fast.N + 1, fast.colom = fast.move3] != 1
                        && fast.arrayPole[fast.line1 = fast.n + 1, fast.move1] != 1)
                    {
                        fast.arrayPole.SetValue(color = 0, n, move1);
                        fast.arrayPole.SetValue(color = 0, m, move2);
                        fast.arrayPole.SetValue(color = 0, N, move3);
                        fast.arrayPole.SetValue(color = 0, M, move4);

                        fast.n = fast.n + 1;
                        fast.m = fast.m + 1;
                        fast.N = fast.N + 1;
                        fast.M = fast.M + 1;

                        fast.arrayPole.SetValue(color = 1, n, fast.move1);
                        fast.arrayPole.SetValue(color = 1, m, fast.move2);
                        fast.arrayPole.SetValue(color = 1, N, fast.move3);
                        fast.arrayPole.SetValue(color = 1, M, fast.move4);
                        fast.nextFigura = true;
                    }
                    else { fast.nextFigura = false; }
                }
            }
            if (fast.FIG == 7 && fast.position == 4)
            {
                for (int f = 0; f < 20; f++)
                {
                    if (fast.N < 19
                        && fast.arrayPole[fast.line = fast.N + 1, fast.colom = fast.move3] != 1
                        && fast.arrayPole[fast.line1 = fast.m + 1, fast.move2] != 1
                         && fast.arrayPole[fast.line1 = fast.M + 1, fast.move4] != 1)
                    {
                        fast.arrayPole.SetValue(color = 0, n, move1);
                        fast.arrayPole.SetValue(color = 0, m, move2);
                        fast.arrayPole.SetValue(color = 0, N, move3);
                        fast.arrayPole.SetValue(color = 0, M, move4);

                        fast.n = fast.n + 1;
                        fast.m = fast.m + 1;
                        fast.N = fast.N + 1;
                        fast.M = fast.M + 1;

                        fast.arrayPole.SetValue(color = 1, n, fast.move1);
                        fast.arrayPole.SetValue(color = 1, m, fast.move2);
                        fast.arrayPole.SetValue(color = 1, N, fast.move3);
                        fast.arrayPole.SetValue(color = 1, M, fast.move4);
                        fast.nextFigura = true;
                    }
                    else { fast.nextFigura = false; }
                }
            }
        }
Beispiel #5
0
        public void moveDown(ref tetris MoveDown)
        {
            if (MoveDown.FIG == 1)
                {
                    if (MoveDown.m < 19 && MoveDown.arrayPole[MoveDown.line = m + 1, MoveDown.move1] != 1

                        && MoveDown.arrayPole[MoveDown.line1 = m + 1, MoveDown.move2] != 1)
                    {

                        MoveDown.arrayPole.SetValue(color = 0, n, move1);
                        MoveDown.arrayPole.SetValue(color = 0, n, move2);
                        MoveDown.arrayPole.SetValue(color = 0, m, move1);
                        MoveDown.arrayPole.SetValue(color = 0, m, move2);

                        MoveDown.n = MoveDown.n + 1;
                        MoveDown.m = MoveDown.m + 1;

                        MoveDown.arrayPole.SetValue(color = 1, n, move1);
                        MoveDown.arrayPole.SetValue(color = 1, n, move2);
                        MoveDown.arrayPole.SetValue(color = 1, m, move1);
                        MoveDown.arrayPole.SetValue(color = 1, m, move2);

                        MoveDown.nextFigura = true;
                    }
                    else { MoveDown.nextFigura = false; }
                }

                if (MoveDown.FIG == 2 && MoveDown.position == 1)
                {

                    if (MoveDown.M < 19 && MoveDown.arrayPole[MoveDown.line = M + 1, MoveDown.colom = MoveDown.move4] != 1
                      )
                    {
                        MoveDown.arrayPole.SetValue(color = 0, n, move1);
                        MoveDown.arrayPole.SetValue(color = 0, m, move2);
                        MoveDown.arrayPole.SetValue(color = 0, N, move3);
                        MoveDown.arrayPole.SetValue(color = 0, M, move4);

                        MoveDown.n = MoveDown.n + 1;
                        MoveDown.m = MoveDown.m + 1;
                        MoveDown.N = MoveDown.N + 1;
                        MoveDown.M = MoveDown.M + 1;

                        MoveDown.arrayPole.SetValue(color = 1, n, MoveDown.move1);
                        MoveDown.arrayPole.SetValue(color = 1, m, MoveDown.move2);
                        MoveDown.arrayPole.SetValue(color = 1, N, MoveDown.move3);
                        MoveDown.arrayPole.SetValue(color = 1, M, MoveDown.move4);

                        MoveDown.nextFigura = true;
                    }
                    else { MoveDown.nextFigura = false; }
                }

                if (MoveDown.FIG == 2 && MoveDown.position == 2)
                {

                    if (MoveDown.M < 19 && MoveDown.arrayPole[MoveDown.line = M + 1, MoveDown.colom = MoveDown.move4] != 1
                          && MoveDown.arrayPole[MoveDown.line = N + 1, MoveDown.colom = MoveDown.move3] != 1
                        && MoveDown.arrayPole[MoveDown.line = m + 1, MoveDown.colom = MoveDown.move2] != 1
                        && MoveDown.arrayPole[MoveDown.line = n + 1, MoveDown.colom = MoveDown.move1] != 1)
                    {
                        MoveDown.arrayPole.SetValue(color = 0, n, move1);
                        MoveDown.arrayPole.SetValue(color = 0, m, move2);
                        MoveDown.arrayPole.SetValue(color = 0, N, move3);
                        MoveDown.arrayPole.SetValue(color = 0, M, move4);

                        MoveDown.n = MoveDown.n + 1;
                        MoveDown.m = MoveDown.m + 1;
                        MoveDown.N = MoveDown.N + 1;
                        MoveDown.M = MoveDown.M + 1;

                        MoveDown.arrayPole.SetValue(color = 1, n, MoveDown.move1);
                        MoveDown.arrayPole.SetValue(color = 1, m, MoveDown.move2);
                        MoveDown.arrayPole.SetValue(color = 1, N, MoveDown.move3);
                        MoveDown.arrayPole.SetValue(color = 1, M, MoveDown.move4);

                        MoveDown.nextFigura = true;
                    }
                    else { MoveDown.nextFigura = false; }
                }

            if (MoveDown.FIG == 3 && MoveDown.position == 1)
               {
                if (MoveDown.N < 19 && MoveDown.arrayPole[MoveDown.line = N + 1, MoveDown.colom = MoveDown.move3] != 1
                    && MoveDown.arrayPole[MoveDown.line = M + 1, MoveDown.colom = MoveDown.move4] != 1)
                {
                    MoveDown.arrayPole.SetValue(color = 0, n, move1);
                    MoveDown.arrayPole.SetValue(color = 0, m, move2);
                    MoveDown.arrayPole.SetValue(color = 0, N, move3);
                    MoveDown.arrayPole.SetValue(color = 0, M, move4);

                    MoveDown.n = MoveDown.n + 1;
                    MoveDown.m = MoveDown.m + 1;
                    MoveDown.N = MoveDown.N + 1;
                    MoveDown.M = MoveDown.M + 1;

                    MoveDown.arrayPole.SetValue(color = 1, n, MoveDown.move1);
                    MoveDown.arrayPole.SetValue(color = 1, m, MoveDown.move2);
                    MoveDown.arrayPole.SetValue(color = 1, N, MoveDown.move3);
                    MoveDown.arrayPole.SetValue(color = 1, M, MoveDown.move4);

                    MoveDown.nextFigura = true;
               }
                else { MoveDown.nextFigura = false; }
              }
            if (MoveDown.FIG == 3 && MoveDown.position == 2)
            {
                if (MoveDown.N < 19
                    && MoveDown.arrayPole[MoveDown.line = MoveDown.N + 1,MoveDown.move3] != 1
                    && MoveDown.arrayPole[MoveDown.line = MoveDown.M + 1, MoveDown.move4] != 1
                     && MoveDown.arrayPole[MoveDown.line1 = MoveDown.n + 1, MoveDown.move1] != 1)
                {
                    MoveDown.arrayPole.SetValue(color = 0, n, move1);
                    MoveDown.arrayPole.SetValue(color = 0, m, move2);
                    MoveDown.arrayPole.SetValue(color = 0, N, move3);
                    MoveDown.arrayPole.SetValue(color = 0, M, move4);

                    MoveDown.n = MoveDown.n + 1;
                    MoveDown.m = MoveDown.m + 1;
                    MoveDown.N = MoveDown.N + 1;
                    MoveDown.M = MoveDown.M + 1;

                    MoveDown.arrayPole.SetValue(color = 1, n, MoveDown.move1);
                    MoveDown.arrayPole.SetValue(color = 1, m, MoveDown.move2);
                    MoveDown.arrayPole.SetValue(color = 1, N, MoveDown.move3);
                    MoveDown.arrayPole.SetValue(color = 1, M, MoveDown.move4);

                    MoveDown.nextFigura = true;
                }
                else { MoveDown.nextFigura = false; }
            }

            if (MoveDown.FIG == 3 && MoveDown.position == 3)
            {
                if (MoveDown.N < 19 && MoveDown.arrayPole[MoveDown.line = MoveDown.N + 1, MoveDown.colom = MoveDown.move3] != 1
                    && MoveDown.arrayPole[MoveDown.line1 = MoveDown.n + 1, MoveDown.move1] != 1)
                {
                    MoveDown.arrayPole.SetValue(color = 0, n, move1);
                    MoveDown.arrayPole.SetValue(color = 0, m, move2);
                    MoveDown.arrayPole.SetValue(color = 0, N, move3);
                    MoveDown.arrayPole.SetValue(color = 0, M, move4);

                    MoveDown.n = MoveDown.n + 1;
                    MoveDown.m = MoveDown.m + 1;
                    MoveDown.N = MoveDown.N + 1;
                    MoveDown.M = MoveDown.M + 1;

                    MoveDown.arrayPole.SetValue(color = 1, n, MoveDown.move1);
                    MoveDown.arrayPole.SetValue(color = 1, m, MoveDown.move2);
                    MoveDown.arrayPole.SetValue(color = 1, N, MoveDown.move3);
                    MoveDown.arrayPole.SetValue(color = 1, M, MoveDown.move4);

                    MoveDown.nextFigura = true;
                }
                else { MoveDown.nextFigura = false; }
            }

            if (MoveDown.FIG == 3 && MoveDown.position == 4)
            {
                if (MoveDown.N < 19 && MoveDown.arrayPole[MoveDown.line = MoveDown.N + 1, MoveDown.colom = MoveDown.move3] != 1
                    && MoveDown.arrayPole[MoveDown.line1 = MoveDown.n + 1, MoveDown.move1] != 1
                    && MoveDown.arrayPole[MoveDown.line1 = MoveDown.m + 1, MoveDown.move2] != 1)
                {
                    MoveDown.arrayPole.SetValue(color = 0, n, move1);
                    MoveDown.arrayPole.SetValue(color = 0, m, move2);
                    MoveDown.arrayPole.SetValue(color = 0, N, move3);
                    MoveDown.arrayPole.SetValue(color = 0, M, move4);

                    MoveDown.n = MoveDown.n + 1;
                    MoveDown.m = MoveDown.m + 1;
                    MoveDown.N = MoveDown.N + 1;
                    MoveDown.M = MoveDown.M + 1;

                    MoveDown.arrayPole.SetValue(color = 1, n, MoveDown.move1);
                    MoveDown.arrayPole.SetValue(color = 1, m, MoveDown.move2);
                    MoveDown.arrayPole.SetValue(color = 1, N, MoveDown.move3);
                    MoveDown.arrayPole.SetValue(color = 1, M, MoveDown.move4);

                    MoveDown.nextFigura = true;
                }
                else { MoveDown.nextFigura = false; }
            }

            if (MoveDown.FIG == 4 && MoveDown.position == 1)
            {
                if (MoveDown.M < 19 && MoveDown.arrayPole[MoveDown.line = MoveDown.M + 1, MoveDown.colom = MoveDown.move4] != 1
                   && MoveDown.arrayPole[MoveDown.line1 = MoveDown.m + 1, MoveDown.move2] != 1)
                {
                    MoveDown.arrayPole.SetValue(color = 0, n, move1);
                    MoveDown.arrayPole.SetValue(color = 0, m, move2);
                    MoveDown.arrayPole.SetValue(color = 0, N, move3);
                    MoveDown.arrayPole.SetValue(color = 0, M, move4);

                    MoveDown.n = MoveDown.n + 1;
                    MoveDown.m = MoveDown.m + 1;
                    MoveDown.N = MoveDown.N + 1;
                    MoveDown.M = MoveDown.M + 1;

                    MoveDown.arrayPole.SetValue(color = 1, n, MoveDown.move1);
                    MoveDown.arrayPole.SetValue(color = 1, m, MoveDown.move2);
                    MoveDown.arrayPole.SetValue(color = 1, N, MoveDown.move3);
                    MoveDown.arrayPole.SetValue(color = 1, M, MoveDown.move4);

                    MoveDown.nextFigura = true;
                }
                else { MoveDown.nextFigura = false; }
            }
            if (MoveDown.FIG == 4 && MoveDown.position == 2)
            {
                if (MoveDown.N < 19 && MoveDown.arrayPole[MoveDown.line = MoveDown.N + 1, MoveDown.colom = MoveDown.move3] != 1
                   && MoveDown.arrayPole[MoveDown.line1 = MoveDown.m + 1, MoveDown.move2] != 1
                     && MoveDown.arrayPole[MoveDown.line1 = MoveDown.n + 1, MoveDown.move1] != 1)
                {
                    MoveDown.arrayPole.SetValue(color = 0, n, move1);
                    MoveDown.arrayPole.SetValue(color = 0, m, move2);
                    MoveDown.arrayPole.SetValue(color = 0, N, move3);
                    MoveDown.arrayPole.SetValue(color = 0, M, move4);

                    MoveDown.n = MoveDown.n + 1;
                    MoveDown.m = MoveDown.m + 1;
                    MoveDown.N = MoveDown.N + 1;
                    MoveDown.M = MoveDown.M + 1;

                    MoveDown.arrayPole.SetValue(color = 1, n, MoveDown.move1);
                    MoveDown.arrayPole.SetValue(color = 1, m, MoveDown.move2);
                    MoveDown.arrayPole.SetValue(color = 1, N, MoveDown.move3);
                    MoveDown.arrayPole.SetValue(color = 1, M, MoveDown.move4);

                    MoveDown.nextFigura = true;
                }
                else { MoveDown.nextFigura = false; }
            }
            if (MoveDown.FIG == 5 && MoveDown.position == 1)
            {
                if (MoveDown.M < 19 && MoveDown.arrayPole[MoveDown.line = MoveDown.M + 1, MoveDown.colom = MoveDown.move4] != 1
                   && MoveDown.arrayPole[MoveDown.line1 = MoveDown.m + 1, MoveDown.move2] != 1)

                {
                    MoveDown.arrayPole.SetValue(color = 0, n, move1);
                    MoveDown.arrayPole.SetValue(color = 0, m, move2);
                    MoveDown.arrayPole.SetValue(color = 0, N, move3);
                    MoveDown.arrayPole.SetValue(color = 0, M, move4);

                    MoveDown.n = MoveDown.n + 1;
                    MoveDown.m = MoveDown.m + 1;
                    MoveDown.N = MoveDown.N + 1;
                    MoveDown.M = MoveDown.M + 1;

                    MoveDown.arrayPole.SetValue(color = 1, n, MoveDown.move1);
                    MoveDown.arrayPole.SetValue(color = 1, m, MoveDown.move2);
                    MoveDown.arrayPole.SetValue(color = 1, N, MoveDown.move3);
                    MoveDown.arrayPole.SetValue(color = 1, M, MoveDown.move4);

                    MoveDown.nextFigura = true;
                }
                else { MoveDown.nextFigura = false; }
            }
            if (MoveDown.FIG == 5 && MoveDown.position == 2)
            {
                if (MoveDown.N < 19 && MoveDown.arrayPole[MoveDown.line = MoveDown.N + 1, MoveDown.colom = MoveDown.move3] != 1
                   && MoveDown.arrayPole[MoveDown.line1 = MoveDown.m + 1, MoveDown.move2] != 1
                   && MoveDown.arrayPole[MoveDown.line1 = MoveDown.n + 1, MoveDown.move1] != 1)
                {
                    MoveDown.arrayPole.SetValue(color = 0, n, move1);
                    MoveDown.arrayPole.SetValue(color = 0, m, move2);
                    MoveDown.arrayPole.SetValue(color = 0, N, move3);
                    MoveDown.arrayPole.SetValue(color = 0, M, move4);

                    MoveDown.n = MoveDown.n + 1;
                    MoveDown.m = MoveDown.m + 1;
                    MoveDown.N = MoveDown.N + 1;
                    MoveDown.M = MoveDown.M + 1;

                    MoveDown.arrayPole.SetValue(color = 1, n, MoveDown.move1);
                    MoveDown.arrayPole.SetValue(color = 1, m, MoveDown.move2);
                    MoveDown.arrayPole.SetValue(color = 1, N, MoveDown.move3);
                    MoveDown.arrayPole.SetValue(color = 1, M, MoveDown.move4);

                    MoveDown.nextFigura = true;
                }
                else { MoveDown.nextFigura = false; }
            }

            if (MoveDown.FIG == 6 && MoveDown.position == 1)
            {
                if (MoveDown.N < 19
                    && MoveDown.arrayPole[MoveDown.line = MoveDown.N + 1, MoveDown.colom = MoveDown.move3] != 1
                    && MoveDown.arrayPole[MoveDown.line1 = MoveDown.M + 1, MoveDown.move4] != 1)
                {
                    MoveDown.arrayPole.SetValue(color = 0, n, move1);
                    MoveDown.arrayPole.SetValue(color = 0, m, move2);
                    MoveDown.arrayPole.SetValue(color = 0, N, move3);
                    MoveDown.arrayPole.SetValue(color = 0, M, move4);

                    MoveDown.n = MoveDown.n + 1;
                    MoveDown.m = MoveDown.m + 1;
                    MoveDown.N = MoveDown.N + 1;
                    MoveDown.M = MoveDown.M + 1;

                    MoveDown.arrayPole.SetValue(color = 1, n, MoveDown.move1);
                    MoveDown.arrayPole.SetValue(color = 1, m, MoveDown.move2);
                    MoveDown.arrayPole.SetValue(color = 1, N, MoveDown.move3);
                    MoveDown.arrayPole.SetValue(color = 1, M, MoveDown.move4);

                    MoveDown.nextFigura = true;
                }
                else { MoveDown.nextFigura = false; }
            }

            if (MoveDown.FIG == 6 && MoveDown.position == 2)
            {
                if (MoveDown.n < 19
                    && MoveDown.arrayPole[MoveDown.line = MoveDown.n + 1, MoveDown.colom = MoveDown.move1] != 1
                    && MoveDown.arrayPole[MoveDown.line = MoveDown.N + 1, MoveDown.colom = MoveDown.move3] != 1
                    && MoveDown.arrayPole[MoveDown.line1 = MoveDown.M + 1, MoveDown.move4] != 1)
                {
                    MoveDown.arrayPole.SetValue(color = 0, n, move1);
                    MoveDown.arrayPole.SetValue(color = 0, m, move2);
                    MoveDown.arrayPole.SetValue(color = 0, N, move3);
                    MoveDown.arrayPole.SetValue(color = 0, M, move4);

                    MoveDown.n = MoveDown.n + 1;
                    MoveDown.m = MoveDown.m + 1;
                    MoveDown.N = MoveDown.N + 1;
                    MoveDown.M = MoveDown.M + 1;

                    MoveDown.arrayPole.SetValue(color = 1, n, MoveDown.move1);
                    MoveDown.arrayPole.SetValue(color = 1, m, MoveDown.move2);
                    MoveDown.arrayPole.SetValue(color = 1, N, MoveDown.move3);
                    MoveDown.arrayPole.SetValue(color = 1, M, MoveDown.move4);

                    MoveDown.nextFigura = true;
                }
                else { MoveDown.nextFigura = false; }
            }
            if (MoveDown.FIG == 6 && MoveDown.position == 3)
            {
                if (MoveDown.n < 19
                    && MoveDown.arrayPole[MoveDown.line = MoveDown.n + 1, MoveDown.colom = MoveDown.move1] != 1

                    && MoveDown.arrayPole[MoveDown.line1 = MoveDown.m + 1, MoveDown.move2] != 1)
                {
                    MoveDown.arrayPole.SetValue(color = 0, n, move1);
                    MoveDown.arrayPole.SetValue(color = 0, m, move2);
                    MoveDown.arrayPole.SetValue(color = 0, N, move3);
                    MoveDown.arrayPole.SetValue(color = 0, M, move4);

                    MoveDown.n = MoveDown.n + 1;
                    MoveDown.m = MoveDown.m + 1;
                    MoveDown.N = MoveDown.N + 1;
                    MoveDown.M = MoveDown.M + 1;

                    MoveDown.arrayPole.SetValue(color = 1, n, MoveDown.move1);
                    MoveDown.arrayPole.SetValue(color = 1, m, MoveDown.move2);
                    MoveDown.arrayPole.SetValue(color = 1, N, MoveDown.move3);
                    MoveDown.arrayPole.SetValue(color = 1, M, MoveDown.move4);

                    MoveDown.nextFigura = true;
                }
                else { MoveDown.nextFigura = false; }
            }

            if (MoveDown.FIG == 6 && MoveDown.position == 4)
            {
                if (MoveDown.N < 19
                    && MoveDown.arrayPole[MoveDown.line = MoveDown.N + 1, MoveDown.colom = MoveDown.move3] != 1
                   && MoveDown.arrayPole[MoveDown.line1 = MoveDown.m + 1, MoveDown.move2] != 1
                   && MoveDown.arrayPole[MoveDown.line1 = MoveDown.M + 1, MoveDown.move4] != 1)
                {
                    MoveDown.arrayPole.SetValue(color = 0, n, move1);
                    MoveDown.arrayPole.SetValue(color = 0, m, move2);
                    MoveDown.arrayPole.SetValue(color = 0, N, move3);
                    MoveDown.arrayPole.SetValue(color = 0, M, move4);

                    MoveDown.n = MoveDown.n + 1;
                    MoveDown.m = MoveDown.m + 1;
                    MoveDown.N = MoveDown.N + 1;
                    MoveDown.M = MoveDown.M + 1;

                    MoveDown.arrayPole.SetValue(color = 1, n, MoveDown.move1);
                    MoveDown.arrayPole.SetValue(color = 1, m, MoveDown.move2);
                    MoveDown.arrayPole.SetValue(color = 1, N, MoveDown.move3);
                    MoveDown.arrayPole.SetValue(color = 1, M, MoveDown.move4);

                    MoveDown.nextFigura = true;
                }
                else { MoveDown.nextFigura = false; }
            }
            if (MoveDown.FIG == 7 && MoveDown.position == 1)
            {
                if (MoveDown.N < 19
                    && MoveDown.arrayPole[MoveDown.line = MoveDown.N + 1, MoveDown.colom = MoveDown.move3] != 1
                    && MoveDown.arrayPole[MoveDown.line1 = MoveDown.M + 1, MoveDown.move4] != 1)
                {
                    MoveDown.arrayPole.SetValue(color = 0, n, move1);
                    MoveDown.arrayPole.SetValue(color = 0, m, move2);
                    MoveDown.arrayPole.SetValue(color = 0, N, move3);
                    MoveDown.arrayPole.SetValue(color = 0, M, move4);

                    MoveDown.n = MoveDown.n + 1;
                    MoveDown.m = MoveDown.m + 1;
                    MoveDown.N = MoveDown.N + 1;
                    MoveDown.M = MoveDown.M + 1;

                    MoveDown.arrayPole.SetValue(color = 1, n, MoveDown.move1);
                    MoveDown.arrayPole.SetValue(color = 1, m, MoveDown.move2);
                    MoveDown.arrayPole.SetValue(color = 1, N, MoveDown.move3);
                    MoveDown.arrayPole.SetValue(color = 1, M, MoveDown.move4);

                    MoveDown.nextFigura = true;
                }
                else { MoveDown.nextFigura = false; }
            }
            if (MoveDown.FIG == 7 && MoveDown.position == 2)
            {
                if (MoveDown.N < 19
                    && MoveDown.arrayPole[MoveDown.line = MoveDown.N + 1, MoveDown.colom = MoveDown.move3] != 1
                    && MoveDown.arrayPole[MoveDown.line1 = MoveDown.m + 1, MoveDown.move2] != 1
                     && MoveDown.arrayPole[MoveDown.line1 = MoveDown.n + 1, MoveDown.move1] != 1)
                {
                    MoveDown.arrayPole.SetValue(color = 0, n, move1);
                    MoveDown.arrayPole.SetValue(color = 0, m, move2);
                    MoveDown.arrayPole.SetValue(color = 0, N, move3);
                    MoveDown.arrayPole.SetValue(color = 0, M, move4);

                    MoveDown.n = MoveDown.n + 1;
                    MoveDown.m = MoveDown.m + 1;
                    MoveDown.N = MoveDown.N + 1;
                    MoveDown.M = MoveDown.M + 1;

                    MoveDown.arrayPole.SetValue(color = 1, n, MoveDown.move1);
                    MoveDown.arrayPole.SetValue(color = 1, m, MoveDown.move2);
                    MoveDown.arrayPole.SetValue(color = 1, N, MoveDown.move3);
                    MoveDown.arrayPole.SetValue(color = 1, M, MoveDown.move4);

                    MoveDown.nextFigura = true;
                }
                else { MoveDown.nextFigura = false; }
            }
            if (MoveDown.FIG == 7 && MoveDown.position == 3)
            {
                if (MoveDown.N < 19
                    && MoveDown.arrayPole[MoveDown.line = MoveDown.N + 1, MoveDown.colom = MoveDown.move3] != 1
                    && MoveDown.arrayPole[MoveDown.line1 = MoveDown.n + 1, MoveDown.move1] != 1)
                {
                    MoveDown.arrayPole.SetValue(color = 0, n, move1);
                    MoveDown.arrayPole.SetValue(color = 0, m, move2);
                    MoveDown.arrayPole.SetValue(color = 0, N, move3);
                    MoveDown.arrayPole.SetValue(color = 0, M, move4);

                    MoveDown.n = MoveDown.n + 1;
                    MoveDown.m = MoveDown.m + 1;
                    MoveDown.N = MoveDown.N + 1;
                    MoveDown.M = MoveDown.M + 1;

                    MoveDown.arrayPole.SetValue(color = 1, n, MoveDown.move1);
                    MoveDown.arrayPole.SetValue(color = 1, m, MoveDown.move2);
                    MoveDown.arrayPole.SetValue(color = 1, N, MoveDown.move3);
                    MoveDown.arrayPole.SetValue(color = 1, M, MoveDown.move4);

                    MoveDown.nextFigura = true;
                }
                else { MoveDown.nextFigura = false; }
            }
            if (MoveDown.FIG == 7 && MoveDown.position == 4)
            {
                if (MoveDown.N < 19
                    && MoveDown.arrayPole[MoveDown.line = MoveDown.N + 1, MoveDown.colom = MoveDown.move3] != 1
                    && MoveDown.arrayPole[MoveDown.line1 = MoveDown.m + 1, MoveDown.move2] != 1
                     && MoveDown.arrayPole[MoveDown.line1 = MoveDown.M + 1, MoveDown.move4] != 1)
                {
                    MoveDown.arrayPole.SetValue(color = 0, n, move1);
                    MoveDown.arrayPole.SetValue(color = 0, m, move2);
                    MoveDown.arrayPole.SetValue(color = 0, N, move3);
                    MoveDown.arrayPole.SetValue(color = 0, M, move4);

                    MoveDown.n = MoveDown.n + 1;
                    MoveDown.m = MoveDown.m + 1;
                    MoveDown.N = MoveDown.N + 1;
                    MoveDown.M = MoveDown.M + 1;

                    MoveDown.arrayPole.SetValue(color = 1, n, MoveDown.move1);
                    MoveDown.arrayPole.SetValue(color = 1, m, MoveDown.move2);
                    MoveDown.arrayPole.SetValue(color = 1, N, MoveDown.move3);
                    MoveDown.arrayPole.SetValue(color = 1, M, MoveDown.move4);

                    MoveDown.nextFigura = true;
                }
                else { MoveDown.nextFigura = false; }
            }
        }
Beispiel #6
0
 public void L_figura(ref tetris L)
 {
     L.n = 0; L.move1 = 4;
       L.m = 1; L.move2 = 4;
       L.N = 2; L.move3 = 4;
       L.M = 2; L.move4 = 5;
       L.color = 1;
       L.arrayPole.SetValue(color, n, L.move1);
       L.arrayPole.SetValue(color, m, L.move2);
       L.arrayPole.SetValue(color, N, L.move3);
       L.arrayPole.SetValue(color, M, L.move4);
 }
Beispiel #7
0
 public void J_figura(ref tetris J)
 {
     J.n = 0; J.move1 = 5;
       J.m = 1; J.move2 = 5;
       J.N = 2; J.move3 = 5;
       J.M = 2; J.move4 = 4;
       J.color = 1;
       J.arrayPole.SetValue(color, n, J.move1);
       J.arrayPole.SetValue(color, m, J.move2);
       J.arrayPole.SetValue(color, N, J.move3);
       J.arrayPole.SetValue(color, M, J.move4);
 }
Beispiel #8
0
 public void triangle(ref tetris tri)
 {
     tri.move1 = 4;
       tri.move2 = 4;
       tri.move3 = 4;
       tri.move4 = 5;
       tri.n = 0;
       tri.m = 1;
       tri.N = 2;
       tri.M = 1;
       tri.color = 1;
       tri.arrayPole.SetValue(color, n, tri.move1);
       tri.arrayPole.SetValue(color, m, tri.move2);
       tri.arrayPole.SetValue(color, N, tri.move3);
       tri.arrayPole.SetValue(color, M, tri.move4);
 }
Beispiel #9
0
 public void Z_figura(ref tetris Z)
 {
     Z.n = 0; Z.move1 = 5;
      Z.m = 1; Z.move2 = 5;
      Z.N = 1; Z.move3 = 4;
      Z.M = 2; Z.move4 = 4;
      Z.color = 1;
      Z.arrayPole.SetValue(color, n, Z.move1);
      Z.arrayPole.SetValue(color, m, Z.move2);
      Z.arrayPole.SetValue(color, N, Z.move3);
      Z.arrayPole.SetValue(color, M, Z.move4);
 }
Beispiel #10
0
 public void S_figura(ref tetris S)
 {
     S.n = 0; S.move1=4;
       S.m = 1; S.move2 = 4;
       S.N = 1; S.move3 = 5;
       S.M = 2; S.move4 = 5;
       S.color = 1;
       S.arrayPole.SetValue(color, n, S.move1);
       S.arrayPole.SetValue(color, m, S.move2);
       S.arrayPole.SetValue(color, N, S.move3);
       S.arrayPole.SetValue(color, M, S.move4);
 }
Beispiel #11
0
        public void rotation(ref tetris Rotation)
        {
            if (Rotation.FIG == 2  && Rotation.move2<=7 &&Rotation.move2>0

               && Rotation.arrayPole[Rotation.m, Rotation.colom = Rotation.move1 + 2] != 1
                 && Rotation.arrayPole[Rotation.N, Rotation.line = Rotation.move1 + 2] != 1
                && Rotation.arrayPole[Rotation.M, Rotation.line1 = Rotation.move1 + 2] != 1
               && Rotation.arrayPole[Rotation.m, Rotation.line2 = Rotation.move1 + 1] != 1
                 && Rotation.arrayPole[Rotation.N, Rotation.line3 = Rotation.move1 + 1] != 1
                && Rotation.arrayPole[Rotation.M, Rotation.line4 = Rotation.move1 + 1] != 1
                && Rotation.position == 1
                && Rotation.arrayPole[Rotation.m, Rotation.line5 = Rotation.move1 - 1] != 1)

               {
               Rotation.arrayPole.SetValue(color = 0, n, move1);
               Rotation.arrayPole.SetValue(color = 0, m, move2);
               Rotation.arrayPole.SetValue(color = 0, N, move3);
               Rotation.arrayPole.SetValue(color = 0, M, move4);

                   Rotation.move1 = Rotation.move1 - 1;
                   Rotation.move3 = Rotation.move3 + 1;
                   Rotation.move4 = Rotation.move4 + 2;
                   Rotation.n = Rotation.m;
                   Rotation.N = Rotation.m;
                   Rotation.M = Rotation.m;

                   Rotation.arrayPole.SetValue(Rotation.color = 1, n, Rotation.move1);
                   Rotation.arrayPole.SetValue(Rotation.color = 1, m, Rotation.move2);
                   Rotation.arrayPole.SetValue(Rotation.color = 1, N, Rotation.move3);
                   Rotation.arrayPole.SetValue(Rotation.color = 1, M, Rotation.move4);
               Rotation.position = 2;

              }

               else if (Rotation.FIG == 2 && Rotation.position == 2 && Rotation.m < 18
                && Rotation.arrayPole[Rotation.line = Rotation.m + 2, Rotation.move2] != 1
                && Rotation.arrayPole[Rotation.line1 = Rotation.m + 1, Rotation.move2] != 1
               && Rotation.n>=1)
               {
               Rotation.arrayPole.SetValue(color = 0, n, move1);
               Rotation.arrayPole.SetValue(color = 0, m, move2);
               Rotation.arrayPole.SetValue(color = 0, N, move3);
               Rotation.arrayPole.SetValue(color = 0, M, move4);

                   Rotation.move1 = Rotation.move1 + 1;
                   Rotation.move3 = Rotation.move3 - 1;
                   Rotation.move4 = Rotation.move4 - 2;

               Rotation.n = Rotation.n - 1;
               Rotation.N = Rotation.N + 1;
               Rotation.M = Rotation.M + 2;

               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.n, Rotation.move1);
               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.m, Rotation.move2);
               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.N, Rotation.move3);
               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.M, Rotation.move4);
               Rotation.position = 1;
               }

               if (Rotation.FIG == 3 && Rotation.position == 1 && Rotation.move2>0
               && Rotation.arrayPole[Rotation.line = Rotation.m, Rotation.colom = Rotation.move2-1] != 1)
               {

               Rotation.arrayPole.SetValue(color = 0, n, move1);
               Rotation.arrayPole.SetValue(color = 0, m, move2);
               Rotation.arrayPole.SetValue(color = 0, N, move3);
               Rotation.arrayPole.SetValue(color = 0, M, move4);

               Rotation.move1 = Rotation.move1 - 1;
               Rotation.n = Rotation.n + 1;

               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.n, Rotation.move1);
               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.m, Rotation.move2);
               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.N, Rotation.move3);
               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.M, Rotation.move4);
               Rotation.position = 2; //

               }

            else if (Rotation.FIG == 3 && Rotation.position == 2
              && Rotation.arrayPole[Rotation.line=Rotation.m-1, Rotation.move2]!=1)
               {
               Rotation.arrayPole.SetValue(color = 0, n, move1);
               Rotation.arrayPole.SetValue(color = 0, m, move2);
               Rotation.arrayPole.SetValue(color = 0, N, move3);
               Rotation.arrayPole.SetValue(color = 0, M, move4);
               Rotation.M = Rotation.M - 1;
               Rotation.move4 = Rotation.move4 - 1;

               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.n, Rotation.move1);
               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.m, Rotation.move2);
               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.N, Rotation.move3);
               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.M, Rotation.move4);
               Rotation.position = 3; // позиция три

            }

               else if (Rotation.FIG == 3 && Rotation.position == 3 && Rotation.move3 < 9 && Rotation.N<19
            && Rotation.arrayPole[Rotation.line=Rotation.N+1, Rotation.colom = Rotation.move3] != 1 )

               {

               Rotation.arrayPole.SetValue(color = 0, n, move1);
               Rotation.arrayPole.SetValue(color = 0, m, move2);
               Rotation.arrayPole.SetValue(color = 0, N, move3);
               Rotation.arrayPole.SetValue(color = 0, M, move4);

               Rotation.move3 = Rotation.move3 + 1;
               Rotation.N = Rotation.N - 1;

               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.n, Rotation.move1);
               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.m, Rotation.move2);
               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.N, Rotation.move3);
               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.M, Rotation.move4);
               Rotation.position = 4; // позиция 4

               }
               else if (Rotation.FIG == 3
               && Rotation.position == 4 && Rotation.N < 19 && Rotation.move2>0
              && Rotation.arrayPole[Rotation.line = Rotation.m+1, Rotation.colom = Rotation.move2] != 1)
               {

               Rotation.arrayPole.SetValue(color = 0, n, move1);
               Rotation.arrayPole.SetValue(color = 0, m, move2);
               Rotation.arrayPole.SetValue(color = 0, N, move3);
               Rotation.arrayPole.SetValue(color = 0, M, move4);

               Rotation.N = Rotation.N + 1;
               Rotation.move3 = Rotation.move3 - 1;

               Rotation.M = Rotation.M + 1;
               Rotation.move4 = Rotation.move4 + 1;

               Rotation.n = Rotation.n - 1;
               Rotation.move1 = Rotation.move1 + 1;

               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.n, Rotation.move1);
               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.m, Rotation.move2);
               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.N, Rotation.move3);
               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.M, Rotation.move4);
               Rotation.position = 1; // позиция 4

               }
               if (Rotation.FIG == 4 && Rotation.position == 1 && Rotation.move3 > 0 && Rotation.move1<8
             && Rotation.arrayPole[Rotation.line = Rotation.N-1, Rotation.colom = Rotation.move3 + 1] != 1
                && Rotation.arrayPole[Rotation.line = Rotation.n, Rotation.colom = Rotation.move1 + 1] != 1)
               {

               Rotation.arrayPole.SetValue(color = 0, n, move1);
               Rotation.arrayPole.SetValue(color = 0, m, move2);
               Rotation.arrayPole.SetValue(color = 0, N, move3);
               Rotation.arrayPole.SetValue(color = 0, M, move4);

               Rotation.move1 = Rotation.move1 + 2;
               Rotation.M = Rotation.M - 2;

               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.n, Rotation.move1);
               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.m, Rotation.move2);
               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.N, Rotation.move3);
               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.M, Rotation.move4);
               Rotation.position = 2; //

               }
               else if (Rotation.FIG == 4 && Rotation.position == 2 && Rotation.N < 19
             && Rotation.arrayPole[Rotation.line = Rotation.N + 1, Rotation.move3 ] != 1
                && Rotation.arrayPole[Rotation.line = Rotation.m-1, Rotation.move2] != 1
                && Rotation.arrayPole[Rotation.line = Rotation.m + 1, Rotation.move2] != 1)
               {

               Rotation.arrayPole.SetValue(color = 0, n, move1);
               Rotation.arrayPole.SetValue(color = 0, m, move2);
               Rotation.arrayPole.SetValue(color = 0, N, move3);
               Rotation.arrayPole.SetValue(color = 0, M, move4);

               Rotation.move1 = Rotation.move1 - 2;
               Rotation.M = Rotation.M + 2;

               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.n, Rotation.move1);
               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.m, Rotation.move2);
               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.N, Rotation.move3);
               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.M, Rotation.move4);
               Rotation.position = 1; //

               }
               if (Rotation.FIG == 5 && Rotation.position == 1 && Rotation.move3 > 0
             && Rotation.arrayPole[Rotation.line = Rotation.N-1, Rotation.colom = Rotation.move3 - 1] != 1
             && Rotation.arrayPole[Rotation.line = Rotation.N-1, Rotation.colom = Rotation.move3] != 1)
               {

               Rotation.arrayPole.SetValue(color = 0, n, move1);
               Rotation.arrayPole.SetValue(color = 0, m, move2);
               Rotation.arrayPole.SetValue(color = 0, N, move3);
               Rotation.arrayPole.SetValue(color = 0, M, move4);

               Rotation.move1 = Rotation.move1 - 2;
               Rotation.M = Rotation.M - 2;

               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.n, Rotation.move1);
               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.m, Rotation.move2);
               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.N, Rotation.move3);
               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.M, Rotation.move4);
               Rotation.position = 2; //
               }
               else if (Rotation.FIG == 5 && Rotation.position == 2 && Rotation.N < 19
              && Rotation.arrayPole[Rotation.line = Rotation.N + 1, Rotation.colom = Rotation.move3 + 1] != 1
              && Rotation.arrayPole[Rotation.line = Rotation.N + 1, Rotation.colom = Rotation.move3] != 1)
               {

               Rotation.arrayPole.SetValue(color = 0, n, move1);
               Rotation.arrayPole.SetValue(color = 0, m, move2);
               Rotation.arrayPole.SetValue(color = 0, N, move3);
               Rotation.arrayPole.SetValue(color = 0, M, move4);

               Rotation.move1 = Rotation.move1 + 2;
               Rotation.M = Rotation.M + 2;

               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.n, Rotation.move1);
               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.m, Rotation.move2);
               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.N, Rotation.move3);
               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.M, Rotation.move4);
               Rotation.position = 1; //
               }
               if (Rotation.FIG == 6 && Rotation.position == 1 && Rotation.move3 < 9
            && Rotation.arrayPole[Rotation.line = Rotation.n, Rotation.colom = Rotation.move1 - 1] != 1
            && Rotation.arrayPole[Rotation.line = Rotation.m, Rotation.colom = Rotation.move2-1] != 1
                && Rotation.arrayPole[Rotation.line = Rotation.m, Rotation.colom = Rotation.move2 + 1] != 1
                && Rotation.arrayPole[Rotation.line = Rotation.N, Rotation.colom = Rotation.move3 + 1] != 1)
               {

               Rotation.arrayPole.SetValue(color = 0, n, move1);
               Rotation.arrayPole.SetValue(color = 0, m, move2);
               Rotation.arrayPole.SetValue(color = 0, N, move3);
               Rotation.arrayPole.SetValue(color = 0, M, move4);

               Rotation.move1 = Rotation.move1 + 1;
               Rotation.move2 = Rotation.move2 + 1;
               Rotation.n = Rotation.n + 2;
               Rotation.M = Rotation.M - 1;
               Rotation.N = Rotation.N - 1;

               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.n, Rotation.move1);
               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.m, Rotation.move2);
               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.N, Rotation.move3);
               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.M, Rotation.move4);
               Rotation.position = 2; //
               }
               else if (Rotation.FIG == 6 && Rotation.position == 2
              && Rotation.arrayPole[Rotation.line = Rotation.m-1, Rotation.colom = Rotation.move2] != 1
              && Rotation.arrayPole[Rotation.line = Rotation.N-1, Rotation.colom = Rotation.move3] != 1
              && Rotation.arrayPole[Rotation.line = Rotation.M+1, Rotation.colom = Rotation.move4] != 1
              && Rotation.arrayPole[Rotation.line = Rotation.N+1, Rotation.colom = Rotation.move3] != 1)
               {
               Rotation.arrayPole.SetValue(color = 0, n, move1);
               Rotation.arrayPole.SetValue(color = 0, m, move2);
               Rotation.arrayPole.SetValue(color = 0, N, move3);
               Rotation.arrayPole.SetValue(color = 0, M, move4);

               Rotation.move1 = Rotation.move1 - 1;
               Rotation.m = Rotation.m - 1;
               Rotation.M = Rotation.M - 1;
               Rotation.move4 = Rotation.move4 + 1;

               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.n, Rotation.move1);
               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.m, Rotation.move2);
               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.N, Rotation.move3);
               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.M, Rotation.move4);
               Rotation.position = 3; //
               }
               else if (Rotation.FIG == 6 && Rotation.position == 3 &&Rotation.move3>0
             && Rotation.arrayPole[Rotation.line = Rotation.M, Rotation.colom = Rotation.move4-1] != 1
             && Rotation.arrayPole[Rotation.line = Rotation.N, Rotation.colom = Rotation.move3-1] != 1
             && Rotation.arrayPole[Rotation.line = Rotation.N, Rotation.colom = Rotation.move3+1] != 1
             && Rotation.arrayPole[Rotation.line = Rotation.n, Rotation.colom = Rotation.move1+1] != 1)
               {
               Rotation.arrayPole.SetValue(color = 0, n, move1);
               Rotation.arrayPole.SetValue(color = 0, m, move2);
               Rotation.arrayPole.SetValue(color = 0, N, move3);
               Rotation.arrayPole.SetValue(color = 0, M, move4);

               Rotation.move1 = Rotation.move1 - 1;
               Rotation.n = Rotation.n - 1;

               Rotation.N = Rotation.N + 1;

               Rotation.M = Rotation.M + 2;
               Rotation.move4 = Rotation.move4 + 1;

               Rotation.m = Rotation.m + 2;
              Rotation.move2 = Rotation.move2 - 2;

               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.n, Rotation.move1);
               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.m, Rotation.move2);
               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.N, Rotation.move3);
               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.M, Rotation.move4);
               Rotation.position = 4; //
               }
               else if (Rotation.FIG == 6 && Rotation.position == 4
             && Rotation.arrayPole[Rotation.line = Rotation.M-1, Rotation.colom = Rotation.move4] != 1
             && Rotation.arrayPole[Rotation.line = Rotation.N-1, Rotation.colom = Rotation.move3] != 1
             && Rotation.arrayPole[Rotation.line = Rotation.N-2, Rotation.colom = Rotation.move3] != 1
             && Rotation.arrayPole[Rotation.line = Rotation.M-2, Rotation.colom = Rotation.move4] != 1)
               {
               Rotation.arrayPole.SetValue(color = 0, n, move1);
               Rotation.arrayPole.SetValue(color = 0, m, move2);
               Rotation.arrayPole.SetValue(color = 0, N, move3);
               Rotation.arrayPole.SetValue(color = 0, M, move4);

               Rotation.move1 = Rotation.move1 + 1;
               Rotation.n = Rotation.n - 1;

               Rotation.move4 = Rotation.move4 - 2;

               Rotation.m = Rotation.m - 1;
               Rotation.move2 = Rotation.move2 + 1;

               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.n, Rotation.move1);
               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.m, Rotation.move2);
               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.N, Rotation.move3);
               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.M, Rotation.move4);
               Rotation.position = 1; //
               }
               if (Rotation.FIG == 7 && Rotation.position == 1 && Rotation.move1>0
             && Rotation.arrayPole[Rotation.line = Rotation.n, Rotation.colom = Rotation.move1 - 1] != 1
             && Rotation.arrayPole[Rotation.line = Rotation.m, Rotation.colom = Rotation.move2 - 1] != 1
             && Rotation.arrayPole[Rotation.line = Rotation.m, Rotation.colom = Rotation.move2 + 1] != 1
             && Rotation.arrayPole[Rotation.line = Rotation.n, Rotation.colom = Rotation.move1 + 1] != 1)
               {

               Rotation.arrayPole.SetValue(color = 0, n, move1);
               Rotation.arrayPole.SetValue(color = 0, m, move2);
               Rotation.arrayPole.SetValue(color = 0, N, move3);
               Rotation.arrayPole.SetValue(color = 0, M, move4);

               Rotation.move1 = Rotation.move1 - 1;
               Rotation.n = Rotation.n + 1;

               Rotation.N = Rotation.N - 1;
               Rotation.move3 = Rotation.move3 + 1;

               Rotation.M = Rotation.M - 2;

               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.n, Rotation.move1);
               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.m, Rotation.move2);
               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.N, Rotation.move3);
               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.M, Rotation.move4);
               Rotation.position = 2; //
               }
               else if (Rotation.FIG == 7 && Rotation.position == 2 && Rotation.m<19
               && Rotation.arrayPole[Rotation.line = Rotation.n-1, Rotation.colom = Rotation.move1] != 1
               && Rotation.arrayPole[Rotation.line = Rotation.m-1, Rotation.colom = Rotation.move2] != 1
               && Rotation.arrayPole[Rotation.line = Rotation.m+1, Rotation.colom = Rotation.move2] != 1
               && Rotation.arrayPole[Rotation.line = Rotation.n+1, Rotation.colom = Rotation.move1] != 1)
               {

               Rotation.arrayPole.SetValue(color = 0, n, move1);
               Rotation.arrayPole.SetValue(color = 0, m, move2);
               Rotation.arrayPole.SetValue(color = 0, N, move3);
               Rotation.arrayPole.SetValue(color = 0, M, move4);

               Rotation.n = Rotation.n - 1;
               Rotation.move4 = Rotation.move4 - 1;

               Rotation.N = Rotation.N + 1;
               Rotation.move3 = Rotation.move3 - 1;

               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.n, Rotation.move1);
               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.m, Rotation.move2);
               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.N, Rotation.move3);
               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.M, Rotation.move4);
               Rotation.position = 3; //
               }
               else if (Rotation.FIG == 7 && Rotation.position == 3 &&  Rotation.move2<9
             && Rotation.arrayPole[Rotation.line = Rotation.n + 1, Rotation.colom = Rotation.move1] != 1
             && Rotation.arrayPole[Rotation.line = Rotation.n + 2, Rotation.colom = Rotation.move1] != 1
             && Rotation.arrayPole[Rotation.line = Rotation.m, Rotation.colom = Rotation.move2+1] != 1
             && Rotation.arrayPole[Rotation.line = Rotation.N, Rotation.colom = Rotation.move3+1] != 1)
               {

               Rotation.arrayPole.SetValue(color = 0, n, move1);
               Rotation.arrayPole.SetValue(color = 0, m, move2);
               Rotation.arrayPole.SetValue(color = 0, N, move3);
               Rotation.arrayPole.SetValue(color = 0, M, move4);

               Rotation.n = Rotation.n + 1;
               Rotation.move3 = Rotation.move3 - 1;

               Rotation.M = Rotation.M + 1;
               Rotation.move4 = Rotation.move4 + 1;

               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.n, Rotation.move1);
               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.m, Rotation.move2);
               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.N, Rotation.move3);
               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.M, Rotation.move4);
               Rotation.position = 4; //
               }
               else if (Rotation.FIG == 7 && Rotation.position == 4
               && Rotation.arrayPole[Rotation.line = Rotation.m - 1, Rotation.colom = Rotation.move2] != 1
               && Rotation.arrayPole[Rotation.line = Rotation.M -1, Rotation.colom = Rotation.move4] != 1
               && Rotation.arrayPole[Rotation.line = Rotation.m+1, Rotation.colom = Rotation.move2] != 1
               && Rotation.arrayPole[Rotation.line = Rotation.M+1, Rotation.colom = Rotation.move4] != 1)
               {

               Rotation.arrayPole.SetValue(color = 0, n, move1);
               Rotation.arrayPole.SetValue(color = 0, m, move2);
               Rotation.arrayPole.SetValue(color = 0, N, move3);
               Rotation.arrayPole.SetValue(color = 0, M, move4);

                Rotation.M = Rotation.M + 1;
                Rotation.move3 = Rotation.move3 + 1;

               Rotation.n = Rotation.n - 1;
               Rotation.move1 = Rotation.move1 + 1;

               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.n, Rotation.move1);
               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.m, Rotation.move2);
               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.N, Rotation.move3);
               Rotation.arrayPole.SetValue(Rotation.color = 1, Rotation.M, Rotation.move4);
               Rotation.position = 1; //
               }
        }
Beispiel #12
0
        public void reset(ref tetris res)
        {
            if (res.nextFigura == false)
                {
                    for (int ii = 0; ii < 20; ii++)
                    {
                        int COUNT = 0;
                        int sum = 0;
                        int stringnumber = 0;
                        for (int j = 0; j < 10; j++)
                        {

                            if (res.arrayPole[ii, j] != 0 && COUNT == 0)
                            {
                                sum = sum + 1;

                                if (sum == 10) { j = 0; COUNT = 1; stringnumber = ii; res.score = res.score + 10;  }
                            }
                            if (COUNT == 1)
                            {
                                res.arrayPole[ii, j] = 0;
                            }
                            if (COUNT == 1 && j == 9)
                            {
                                int iiii = 0;
                                for (int iii = 0; iii < stringnumber; iii++) // цикл строки
                                {
                                    for (int jj = 0; jj < 10; jj++)
                                    {
                                        res.arrayPole2[iii, jj] = res.arrayPole[iii, jj];
                                    }
                                }
                                for (int iii = 0; iii < stringnumber; iii++) // цикл строки
                                {
                                    iiii = iiii + 1;
                                    for (int jj = 0; jj < 10; jj++)
                                    {
                                        res.arrayPole[iiii, jj] = res.arrayPole2[iii, jj];
                                    }
                                }
                            }

                        }
                    }

                }
                res.permissionmoveDown = true;
        }
Beispiel #13
0
        public void moveRight(ref tetris RIGHT)
        {
            if (RIGHT.FIG == 1)
               {
               if (RIGHT.move2 < 9 && RIGHT.m < 19

                    && RIGHT.arrayPole[RIGHT.line = n, RIGHT.colom = RIGHT.move2 + 1] != 1
                    && RIGHT.arrayPole[RIGHT.line = m, RIGHT.colom = RIGHT.move2 + 1] != 1)

               {
                   RIGHT.arrayPole.SetValue(color = 0, n, move1);
                   RIGHT.arrayPole.SetValue(color = 0, n, move2);
                   RIGHT.arrayPole.SetValue(color = 0, m, move1);
                   RIGHT.arrayPole.SetValue(color = 0, m, move2);

                   RIGHT.move1 = RIGHT.move1 + 1;
                   RIGHT.move2 = RIGHT.move2 + 1;

                   RIGHT.arrayPole.SetValue(color = 1, n, move1);
                   RIGHT.arrayPole.SetValue(color = 1, n, move2);
                   RIGHT.arrayPole.SetValue(color = 1, m, move1);
                   RIGHT.arrayPole.SetValue(color = 1, m, move2);
               }

               }
               if (RIGHT.FIG == 2 && RIGHT.position==1)
               {
               if (RIGHT.move1 < 9 && RIGHT.M < 19
                   && RIGHT.arrayPole[RIGHT.line = n, RIGHT.colom = RIGHT.move1 + 1] != 1
                   && RIGHT.arrayPole[RIGHT.line = m, RIGHT.colom = RIGHT.move2 + 1] != 1
                   && RIGHT.arrayPole[RIGHT.line = N, RIGHT.colom = RIGHT.move3 + 1] != 1
                   && RIGHT.arrayPole[RIGHT.line = M, RIGHT.colom = RIGHT.move4 + 1] != 1)
               {
                   RIGHT.arrayPole.SetValue(color = 0, n, move1);
                   RIGHT.arrayPole.SetValue(color = 0, m, move2);
                   RIGHT.arrayPole.SetValue(color = 0, N, move3);
                   RIGHT.arrayPole.SetValue(color = 0, M, move4);

                   RIGHT.move1 = RIGHT.move1 + 1;
                   RIGHT.move2 = RIGHT.move2 + 1;
                   RIGHT.move3 = RIGHT.move3 + 1;
                   RIGHT.move4 = RIGHT.move4 + 1;

                   RIGHT.arrayPole.SetValue(color = 1, n, move1);
                   RIGHT.arrayPole.SetValue(color = 1, m, move2);
                   RIGHT.arrayPole.SetValue(color = 1, N, move3);
                   RIGHT.arrayPole.SetValue(color = 1, M, move4);
               }
               }
               if (RIGHT.FIG == 2 && RIGHT.position == 2)
               {
               if (RIGHT.move4 < 9 && RIGHT.M < 19
                   && RIGHT.arrayPole[RIGHT.line = RIGHT.n, RIGHT.move4+1] != 1)
               {
                   RIGHT.arrayPole.SetValue(color = 0, n, move1);
                   RIGHT.arrayPole.SetValue(color = 0, m, move2);
                   RIGHT.arrayPole.SetValue(color = 0, N, move3);
                   RIGHT.arrayPole.SetValue(color = 0, M, move4);

                   RIGHT.move1 = RIGHT.move1 + 1;
                   RIGHT.move2 = RIGHT.move2 + 1;
                   RIGHT.move3 = RIGHT.move3 + 1;
                   RIGHT.move4 = RIGHT.move4 + 1;

                   RIGHT.arrayPole.SetValue(color = 1, n, move1);
                   RIGHT.arrayPole.SetValue(color = 1, m, move2);
                   RIGHT.arrayPole.SetValue(color = 1, N, move3);
                   RIGHT.arrayPole.SetValue(color = 1, M, move4);
               }
               }
             if (RIGHT.FIG == 3 && RIGHT.position == 1)
               {
               if (RIGHT.move4 < 9

                   && RIGHT.arrayPole[RIGHT.n, RIGHT.colom = RIGHT.move1 + 1] != 1
                   && RIGHT.arrayPole[RIGHT.M, RIGHT.colom = RIGHT.move4 + 1] != 1
                   && RIGHT.arrayPole[RIGHT.N, RIGHT.colom = RIGHT.move3 + 1] != 1)
               {
                   RIGHT.arrayPole.SetValue(color = 0, n, move1);
                   RIGHT.arrayPole.SetValue(color = 0, m, move2);
                   RIGHT.arrayPole.SetValue(color = 0, N, move3);
                   RIGHT.arrayPole.SetValue(color = 0, M, move4);
                   RIGHT.move1 = RIGHT.move1 + 1;
                   RIGHT.move2 = RIGHT.move2 + 1;
                   RIGHT.move3 = RIGHT.move3 + 1;
                   RIGHT.move4 = RIGHT.move4 + 1;
                   RIGHT.arrayPole.SetValue(color = 1, n, move1);
                   RIGHT.arrayPole.SetValue(color = 1, m, move2);
                   RIGHT.arrayPole.SetValue(color = 1, N, move3);
                   RIGHT.arrayPole.SetValue(color = 1, M, move4);
               }
               }
               if (RIGHT.FIG == 3 && RIGHT.position == 2)
               {
               if (RIGHT.move4 < 9

                   && RIGHT.arrayPole[RIGHT.M, RIGHT.colom = RIGHT.move4 + 1] != 1
                   && RIGHT.arrayPole[RIGHT.N, RIGHT.colom = RIGHT.move3 + 1] != 1)
               {
                   RIGHT.arrayPole.SetValue(color = 0, n, move1);
                   RIGHT.arrayPole.SetValue(color = 0, m, move2);
                   RIGHT.arrayPole.SetValue(color = 0, N, move3);
                   RIGHT.arrayPole.SetValue(color = 0, M, move4);
                   RIGHT.move1 = RIGHT.move1 + 1;
                   RIGHT.move2 = RIGHT.move2 + 1;
                   RIGHT.move3 = RIGHT.move3 + 1;
                   RIGHT.move4 = RIGHT.move4 + 1;
                   RIGHT.arrayPole.SetValue(color = 1, n, move1);
                   RIGHT.arrayPole.SetValue(color = 1, m, move2);
                   RIGHT.arrayPole.SetValue(color = 1, N, move3);
                   RIGHT.arrayPole.SetValue(color = 1, M, move4);
               }
               }
               if (RIGHT.FIG == 3 && RIGHT.position == 3)
               {
               if (RIGHT.move2 < 9

                   && RIGHT.arrayPole[RIGHT.M, RIGHT.colom = RIGHT.move4 + 1] != 1
                   && RIGHT.arrayPole[RIGHT.m, RIGHT.colom = RIGHT.move2 + 1] != 1
                    && RIGHT.arrayPole[RIGHT.N, RIGHT.colom = RIGHT.move3 + 1] != 1)

               {
                   RIGHT.arrayPole.SetValue(color = 0, n, move1);
                   RIGHT.arrayPole.SetValue(color = 0, m, move2);
                   RIGHT.arrayPole.SetValue(color = 0, N, move3);
                   RIGHT.arrayPole.SetValue(color = 0, M, move4);
                   RIGHT.move1 = RIGHT.move1 + 1;
                   RIGHT.move2 = RIGHT.move2 + 1;
                   RIGHT.move3 = RIGHT.move3 + 1;
                   RIGHT.move4 = RIGHT.move4 + 1;
                   RIGHT.arrayPole.SetValue(color = 1, n, move1);
                   RIGHT.arrayPole.SetValue(color = 1, m, move2);
                   RIGHT.arrayPole.SetValue(color = 1, N, move3);
                   RIGHT.arrayPole.SetValue(color = 1, M, move4);
               }
               }
               if (RIGHT.FIG == 3 && RIGHT.position == 4)
               {
               if (RIGHT.move3 < 9
                   && RIGHT.arrayPole[RIGHT.M, RIGHT.colom = RIGHT.move4 + 1] != 1
                   && RIGHT.arrayPole[RIGHT.N, RIGHT.colom = RIGHT.move3 + 1] != 1)
               {
                   RIGHT.arrayPole.SetValue(color = 0, n, move1);
                   RIGHT.arrayPole.SetValue(color = 0, m, move2);
                   RIGHT.arrayPole.SetValue(color = 0, N, move3);
                   RIGHT.arrayPole.SetValue(color = 0, M, move4);
                   RIGHT.move1 = RIGHT.move1 + 1;
                   RIGHT.move2 = RIGHT.move2 + 1;
                   RIGHT.move3 = RIGHT.move3 + 1;
                   RIGHT.move4 = RIGHT.move4 + 1;
                   RIGHT.arrayPole.SetValue(color = 1, n, move1);
                   RIGHT.arrayPole.SetValue(color = 1, m, move2);
                   RIGHT.arrayPole.SetValue(color = 1, N, move3);
                   RIGHT.arrayPole.SetValue(color = 1, M, move4);
               }
               }

               if (RIGHT.FIG == 4 && RIGHT.position == 1)
               {
               if (RIGHT.move3 < 9
                   && RIGHT.arrayPole[RIGHT.M, RIGHT.colom = RIGHT.move4 + 1] != 1
                   && RIGHT.arrayPole[RIGHT.N, RIGHT.colom = RIGHT.move3 + 1] != 1
                    && RIGHT.arrayPole[RIGHT.n, RIGHT.colom = RIGHT.move1 + 1] != 1)
               {
                   RIGHT.arrayPole.SetValue(color = 0, n, move1);
                   RIGHT.arrayPole.SetValue(color = 0, m, move2);
                   RIGHT.arrayPole.SetValue(color = 0, N, move3);
                   RIGHT.arrayPole.SetValue(color = 0, M, move4);
                   RIGHT.move1 = RIGHT.move1 + 1;
                   RIGHT.move2 = RIGHT.move2 + 1;
                   RIGHT.move3 = RIGHT.move3 + 1;
                   RIGHT.move4 = RIGHT.move4 + 1;
                   RIGHT.arrayPole.SetValue(color = 1, n, move1);
                   RIGHT.arrayPole.SetValue(color = 1, m, move2);
                   RIGHT.arrayPole.SetValue(color = 1, N, move3);
                   RIGHT.arrayPole.SetValue(color = 1, M, move4);
               }
               }
               if (RIGHT.FIG == 4 && RIGHT.position == 2)
               {
               if (RIGHT.move1 < 9
                   && RIGHT.arrayPole[RIGHT.N, RIGHT.colom = RIGHT.move3 + 1] != 1
                   && RIGHT.arrayPole[RIGHT.n, RIGHT.colom = RIGHT.move1 + 1] != 1)
               {
                   RIGHT.arrayPole.SetValue(color = 0, n, move1);
                   RIGHT.arrayPole.SetValue(color = 0, m, move2);
                   RIGHT.arrayPole.SetValue(color = 0, N, move3);
                   RIGHT.arrayPole.SetValue(color = 0, M, move4);
                   RIGHT.move1 = RIGHT.move1 + 1;
                   RIGHT.move2 = RIGHT.move2 + 1;
                   RIGHT.move3 = RIGHT.move3 + 1;
                   RIGHT.move4 = RIGHT.move4 + 1;
                   RIGHT.arrayPole.SetValue(color = 1, n, move1);
                   RIGHT.arrayPole.SetValue(color = 1, m, move2);
                   RIGHT.arrayPole.SetValue(color = 1, N, move3);
                   RIGHT.arrayPole.SetValue(color = 1, M, move4);
               }
               }
               if (RIGHT.FIG == 5 && RIGHT.position == 1)
               {
               if (RIGHT.move1 < 9
                   && RIGHT.arrayPole[RIGHT.n, RIGHT.colom = RIGHT.move1 + 1] != 1
                   && RIGHT.arrayPole[RIGHT.m, RIGHT.colom = RIGHT.move2 + 1] != 1
                    && RIGHT.arrayPole[RIGHT.M, RIGHT.colom = RIGHT.move4 + 1] != 1)
               {
                   RIGHT.arrayPole.SetValue(color = 0, n, move1);
                   RIGHT.arrayPole.SetValue(color = 0, m, move2);
                   RIGHT.arrayPole.SetValue(color = 0, N, move3);
                   RIGHT.arrayPole.SetValue(color = 0, M, move4);
                   RIGHT.move1 = RIGHT.move1 + 1;
                   RIGHT.move2 = RIGHT.move2 + 1;
                   RIGHT.move3 = RIGHT.move3 + 1;
                   RIGHT.move4 = RIGHT.move4 + 1;
                   RIGHT.arrayPole.SetValue(color = 1, n, move1);
                   RIGHT.arrayPole.SetValue(color = 1, m, move2);
                   RIGHT.arrayPole.SetValue(color = 1, N, move3);
                   RIGHT.arrayPole.SetValue(color = 1, M, move4);
               }
               }
               if (RIGHT.FIG == 5 && RIGHT.position == 2)
               {
               if (RIGHT.move2 < 9
                    && RIGHT.arrayPole[RIGHT.m, RIGHT.colom = RIGHT.move2 + 1] != 1
                    && RIGHT.arrayPole[RIGHT.M, RIGHT.colom = RIGHT.move4 + 1] != 1)
               {
                   RIGHT.arrayPole.SetValue(color = 0, n, move1);
                   RIGHT.arrayPole.SetValue(color = 0, m, move2);
                   RIGHT.arrayPole.SetValue(color = 0, N, move3);
                   RIGHT.arrayPole.SetValue(color = 0, M, move4);
                   RIGHT.move1 = RIGHT.move1 + 1;
                   RIGHT.move2 = RIGHT.move2 + 1;
                   RIGHT.move3 = RIGHT.move3 + 1;
                   RIGHT.move4 = RIGHT.move4 + 1;
                   RIGHT.arrayPole.SetValue(color = 1, n, move1);
                   RIGHT.arrayPole.SetValue(color = 1, m, move2);
                   RIGHT.arrayPole.SetValue(color = 1, N, move3);
                   RIGHT.arrayPole.SetValue(color = 1, M, move4);
               }
               }

               if (RIGHT.FIG == 6 && RIGHT.position == 1)
               {
               if (RIGHT.move3 < 9
                    && RIGHT.arrayPole[RIGHT.n, RIGHT.colom = RIGHT.move1 + 1] != 1
                     && RIGHT.arrayPole[RIGHT.m, RIGHT.colom = RIGHT.move2 + 1] != 1
                    && RIGHT.arrayPole[RIGHT.N, RIGHT.colom = RIGHT.move3 + 1] != 1)
               {
                   RIGHT.arrayPole.SetValue(color = 0, n, move1);
                   RIGHT.arrayPole.SetValue(color = 0, m, move2);
                   RIGHT.arrayPole.SetValue(color = 0, N, move3);
                   RIGHT.arrayPole.SetValue(color = 0, M, move4);
                   RIGHT.move1 = RIGHT.move1 + 1;
                   RIGHT.move2 = RIGHT.move2 + 1;
                   RIGHT.move3 = RIGHT.move3 + 1;
                   RIGHT.move4 = RIGHT.move4 + 1;
                   RIGHT.arrayPole.SetValue(color = 1, n, move1);
                   RIGHT.arrayPole.SetValue(color = 1, m, move2);
                   RIGHT.arrayPole.SetValue(color = 1, N, move3);
                   RIGHT.arrayPole.SetValue(color = 1, M, move4);
               }
               }
               if (RIGHT.FIG == 6 && RIGHT.position == 2)
               {
               if (RIGHT.move2 < 9
                    && RIGHT.arrayPole[RIGHT.n, RIGHT.colom = RIGHT.move1 + 1] != 1
                     && RIGHT.arrayPole[RIGHT.m, RIGHT.colom = RIGHT.move2 + 1] != 1)

               {
                   RIGHT.arrayPole.SetValue(color = 0, n, move1);
                   RIGHT.arrayPole.SetValue(color = 0, m, move2);
                   RIGHT.arrayPole.SetValue(color = 0, N, move3);
                   RIGHT.arrayPole.SetValue(color = 0, M, move4);
                   RIGHT.move1 = RIGHT.move1 + 1;
                   RIGHT.move2 = RIGHT.move2 + 1;
                   RIGHT.move3 = RIGHT.move3 + 1;
                   RIGHT.move4 = RIGHT.move4 + 1;
                   RIGHT.arrayPole.SetValue(color = 1, n, move1);
                   RIGHT.arrayPole.SetValue(color = 1, m, move2);
                   RIGHT.arrayPole.SetValue(color = 1, N, move3);
                   RIGHT.arrayPole.SetValue(color = 1, M, move4);
               }
               }
               if (RIGHT.FIG == 6 && RIGHT.position == 3)
               {
               if (RIGHT.move2 < 9
                     && RIGHT.arrayPole[RIGHT.m, RIGHT.colom = RIGHT.move2 + 1] != 1
                     && RIGHT.arrayPole[RIGHT.N, RIGHT.colom = RIGHT.move3 + 1] != 1
                     && RIGHT.arrayPole[RIGHT.n, RIGHT.colom = RIGHT.move1 + 1] != 1)
               {
                   RIGHT.arrayPole.SetValue(color = 0, n, move1);
                   RIGHT.arrayPole.SetValue(color = 0, m, move2);
                   RIGHT.arrayPole.SetValue(color = 0, N, move3);
                   RIGHT.arrayPole.SetValue(color = 0, M, move4);
                   RIGHT.move1 = RIGHT.move1 + 1;
                   RIGHT.move2 = RIGHT.move2 + 1;
                   RIGHT.move3 = RIGHT.move3 + 1;
                   RIGHT.move4 = RIGHT.move4 + 1;
                   RIGHT.arrayPole.SetValue(color = 1, n, move1);
                   RIGHT.arrayPole.SetValue(color = 1, m, move2);
                   RIGHT.arrayPole.SetValue(color = 1, N, move3);
                   RIGHT.arrayPole.SetValue(color = 1, M, move4);
               }
               }
               if (RIGHT.FIG == 6 && RIGHT.position == 4)
               {
               if (RIGHT.move4 < 9
                    && RIGHT.arrayPole[RIGHT.n, RIGHT.colom = RIGHT.move1 + 1] != 1
                    && RIGHT.arrayPole[RIGHT.M, RIGHT.colom = RIGHT.move4 + 1] != 1)
               {
                   RIGHT.arrayPole.SetValue(color = 0, n, move1);
                   RIGHT.arrayPole.SetValue(color = 0, m, move2);
                   RIGHT.arrayPole.SetValue(color = 0, N, move3);
                   RIGHT.arrayPole.SetValue(color = 0, M, move4);
                   RIGHT.move1 = RIGHT.move1 + 1;
                   RIGHT.move2 = RIGHT.move2 + 1;
                   RIGHT.move3 = RIGHT.move3 + 1;
                   RIGHT.move4 = RIGHT.move4 + 1;
                   RIGHT.arrayPole.SetValue(color = 1, n, move1);
                   RIGHT.arrayPole.SetValue(color = 1, m, move2);
                   RIGHT.arrayPole.SetValue(color = 1, N, move3);
                   RIGHT.arrayPole.SetValue(color = 1, M, move4);
               }
               }
               if (RIGHT.FIG == 7 && RIGHT.position == 1)
               {
               if (RIGHT.move4 < 9
                    && RIGHT.arrayPole[RIGHT.n, RIGHT.colom = RIGHT.move1 + 1] != 1
                    && RIGHT.arrayPole[RIGHT.m, RIGHT.colom = RIGHT.move2 + 1] != 1
                    && RIGHT.arrayPole[RIGHT.M, RIGHT.colom = RIGHT.move4 + 1] != 1)
               {
                   RIGHT.arrayPole.SetValue(color = 0, n, move1);
                   RIGHT.arrayPole.SetValue(color = 0, m, move2);
                   RIGHT.arrayPole.SetValue(color = 0, N, move3);
                   RIGHT.arrayPole.SetValue(color = 0, M, move4);
                   RIGHT.move1 = RIGHT.move1 + 1;
                   RIGHT.move2 = RIGHT.move2 + 1;
                   RIGHT.move3 = RIGHT.move3 + 1;
                   RIGHT.move4 = RIGHT.move4 + 1;
                   RIGHT.arrayPole.SetValue(color = 1, n, move1);
                   RIGHT.arrayPole.SetValue(color = 1, m, move2);
                   RIGHT.arrayPole.SetValue(color = 1, N, move3);
                   RIGHT.arrayPole.SetValue(color = 1, M, move4);
               }
               }
               if (RIGHT.FIG == 7 && RIGHT.position == 2)
               {
               if (RIGHT.move4 < 9
                    && RIGHT.arrayPole[RIGHT.M, RIGHT.colom = RIGHT.move4 + 1] != 1
                    && RIGHT.arrayPole[RIGHT.N, RIGHT.colom = RIGHT.move3 + 1] != 1)
               {
                   RIGHT.arrayPole.SetValue(color = 0, n, move1);
                   RIGHT.arrayPole.SetValue(color = 0, m, move2);
                   RIGHT.arrayPole.SetValue(color = 0, N, move3);
                   RIGHT.arrayPole.SetValue(color = 0, M, move4);
                   RIGHT.move1 = RIGHT.move1 + 1;
                   RIGHT.move2 = RIGHT.move2 + 1;
                   RIGHT.move3 = RIGHT.move3 + 1;
                   RIGHT.move4 = RIGHT.move4 + 1;
                   RIGHT.arrayPole.SetValue(color = 1, n, move1);
                   RIGHT.arrayPole.SetValue(color = 1, m, move2);
                   RIGHT.arrayPole.SetValue(color = 1, N, move3);
                   RIGHT.arrayPole.SetValue(color = 1, M, move4);
               }
               }
               if (RIGHT.FIG == 7 && RIGHT.position == 3)
               {
               if (RIGHT.move4 < 9
                    && RIGHT.arrayPole[RIGHT.M, RIGHT.colom = RIGHT.move4 + 1] != 1
                     && RIGHT.arrayPole[RIGHT.m, RIGHT.colom = RIGHT.move2 + 1] != 1
                    && RIGHT.arrayPole[RIGHT.N, RIGHT.colom = RIGHT.move3 + 1] != 1)
               {
                   RIGHT.arrayPole.SetValue(color = 0, n, move1);
                   RIGHT.arrayPole.SetValue(color = 0, m, move2);
                   RIGHT.arrayPole.SetValue(color = 0, N, move3);
                   RIGHT.arrayPole.SetValue(color = 0, M, move4);
                   RIGHT.move1 = RIGHT.move1 + 1;
                   RIGHT.move2 = RIGHT.move2 + 1;
                   RIGHT.move3 = RIGHT.move3 + 1;
                   RIGHT.move4 = RIGHT.move4 + 1;
                   RIGHT.arrayPole.SetValue(color = 1, n, move1);
                   RIGHT.arrayPole.SetValue(color = 1, m, move2);
                   RIGHT.arrayPole.SetValue(color = 1, N, move3);
                   RIGHT.arrayPole.SetValue(color = 1, M, move4);
               }
               }
               if (RIGHT.FIG == 7 && RIGHT.position == 4)
               {
               if (RIGHT.move4 < 9
                    && RIGHT.arrayPole[RIGHT.M, RIGHT.colom = RIGHT.move4 + 1] != 1
                    && RIGHT.arrayPole[RIGHT.N, RIGHT.colom = RIGHT.move3 + 1] != 1)
               {
                   RIGHT.arrayPole.SetValue(color = 0, n, move1);
                   RIGHT.arrayPole.SetValue(color = 0, m, move2);
                   RIGHT.arrayPole.SetValue(color = 0, N, move3);
                   RIGHT.arrayPole.SetValue(color = 0, M, move4);
                   RIGHT.move1 = RIGHT.move1 + 1;
                   RIGHT.move2 = RIGHT.move2 + 1;
                   RIGHT.move3 = RIGHT.move3 + 1;
                   RIGHT.move4 = RIGHT.move4 + 1;
                   RIGHT.arrayPole.SetValue(color = 1, n, move1);
                   RIGHT.arrayPole.SetValue(color = 1, m, move2);
                   RIGHT.arrayPole.SetValue(color = 1, N, move3);
                   RIGHT.arrayPole.SetValue(color = 1, M, move4);
               }
               }
        }
Beispiel #14
0
        public void moveLeft(ref tetris LEFT)
        {
            if (LEFT.FIG == 1)
            {
                if (LEFT.move1 > 0 && LEFT.m < 19
                    && LEFT.arrayPole[LEFT.m, LEFT.line1 = LEFT.move1 - 1] != 1
                    && LEFT.arrayPole[LEFT.n, LEFT.line2 = LEFT.move1 - 1] != 1)
                {
                    LEFT.arrayPole.SetValue(color = 0, n, move1);
                    LEFT.arrayPole.SetValue(color = 0, n, move2);
                    LEFT.arrayPole.SetValue(color = 0, m, move1);
                    LEFT.arrayPole.SetValue(color = 0, m, move2);

                    LEFT.move1 = LEFT.move1 - 1;
                    LEFT.move2 = LEFT.move2 - 1;

                    LEFT.arrayPole.SetValue(color = 1, n, move1);
                    LEFT.arrayPole.SetValue(color = 1, n, move2);
                    LEFT.arrayPole.SetValue(color = 1, m, move1);
                    LEFT.arrayPole.SetValue(color = 1, m, move2);
                }
            }
            if (LEFT.FIG == 2 && LEFT.position==1)
            {
                if (LEFT.move1 > 0 && LEFT.M < 19
                    &&LEFT.arrayPole[LEFT.n, LEFT.colom = LEFT.move1 - 1] != 1
                    &&LEFT.arrayPole[LEFT.m, LEFT.colom = LEFT.move2 - 1] != 1
                    && LEFT.arrayPole[LEFT.N, LEFT.colom = LEFT.move3 - 1] != 1
                    && LEFT.arrayPole[LEFT.M, LEFT.colom = LEFT.move4 - 1] != 1 )
                {
                    LEFT.arrayPole.SetValue(color = 0, n, LEFT.move1);
                    LEFT.arrayPole.SetValue(color = 0, m, LEFT.move2);
                    LEFT.arrayPole.SetValue(color = 0, N, LEFT.move3);
                    LEFT.arrayPole.SetValue(color = 0, M, LEFT.move4);

                    LEFT.move1 = LEFT.move1 - 1;
                    LEFT.move2 = LEFT.move2 - 1;
                    LEFT.move3 = LEFT.move3 - 1;
                    LEFT.move4 = LEFT.move4 - 1;

                    LEFT.arrayPole.SetValue(color = 1, n, LEFT.move1);
                    LEFT.arrayPole.SetValue(color = 1, m, LEFT.move2);
                    LEFT.arrayPole.SetValue(color = 1, N, LEFT.move3);
                    LEFT.arrayPole.SetValue(color = 1, M, LEFT.move4);
                }
            }
            if (LEFT.FIG == 2 && LEFT.position == 2)
            {
                if (LEFT.move1 > 0 && LEFT.M < 19
                   && LEFT.arrayPole[LEFT.line = LEFT.N, LEFT.move1-1] != 1)
                {
                    LEFT.arrayPole.SetValue(color = 0, n, move1);
                    LEFT.arrayPole.SetValue(color = 0, m, move2);
                    LEFT.arrayPole.SetValue(color = 0, N, move3);
                    LEFT.arrayPole.SetValue(color = 0, M, move4);

                    LEFT.move1 = LEFT.move1 - 1;
                    LEFT.move2 = LEFT.move2 - 1;
                    LEFT.move3 = LEFT.move3 - 1;
                    LEFT.move4 = LEFT.move4 - 1;

                    LEFT.arrayPole.SetValue(color = 1, n, move1);
                    LEFT.arrayPole.SetValue(color = 1, m, move2);
                    LEFT.arrayPole.SetValue(color = 1, N, move3);
                    LEFT.arrayPole.SetValue(color = 1, M, move4);
                }
            }
            if (LEFT.FIG == 3 && LEFT.position == 1)
            {
                if (LEFT.move1 > 0
                    && LEFT.arrayPole[LEFT.n, LEFT.colom = LEFT.move1 - 1] != 1
                      && LEFT.arrayPole[LEFT.m, LEFT.colom = LEFT.move2 - 1] != 1
                    && LEFT.arrayPole[LEFT.N, LEFT.colom = LEFT.move3 - 1] != 1)
                {
                LEFT.arrayPole.SetValue(color = 0, n, move1);
                LEFT.arrayPole.SetValue(color = 0, m, move2);
                LEFT.arrayPole.SetValue(color = 0, N, move3);
                LEFT.arrayPole.SetValue(color = 0, M, move4);
                LEFT.move1 = LEFT.move1 - 1;
                LEFT.move2 = LEFT.move2 - 1;
                LEFT.move3 = LEFT.move3 - 1;
                LEFT.move4 = LEFT.move4 - 1;
                LEFT.arrayPole.SetValue(color = 1, n, move1);
                LEFT.arrayPole.SetValue(color = 1, m, move2);
                LEFT.arrayPole.SetValue(color = 1, N, move3);
                LEFT.arrayPole.SetValue(color = 1, M, move4);
                }
            }
             if (LEFT.FIG == 3 && LEFT.position == 2)
               {
                   if (LEFT.move1 > 0
                       && LEFT.arrayPole[LEFT.n, LEFT.colom = LEFT.move1 - 1] != 1
                       && LEFT.arrayPole[LEFT.N, LEFT.colom = LEFT.move3 - 1] != 1)
                   {
                   LEFT.arrayPole.SetValue(color = 0, n, move1);
                   LEFT.arrayPole.SetValue(color = 0, m, move2);
                   LEFT.arrayPole.SetValue(color = 0, N, move3);
                   LEFT.arrayPole.SetValue(color = 0, M, move4);
                   LEFT.move1 = LEFT.move1 - 1;
                   LEFT.move2 = LEFT.move2 - 1;
                   LEFT.move3 = LEFT.move3 - 1;
                   LEFT.move4 = LEFT.move4 - 1;
                   LEFT.arrayPole.SetValue(color = 1, n, move1);
                   LEFT.arrayPole.SetValue(color = 1, m, move2);
                   LEFT.arrayPole.SetValue(color = 1, N, move3);
                   LEFT.arrayPole.SetValue(color = 1, M, move4);
                   }
               }

                 if (LEFT.FIG == 3 && LEFT.position == 3)
               {
                   if (LEFT.move1 > 0
                      && LEFT.arrayPole[LEFT.n, LEFT.colom = LEFT.move1 - 1] != 1
                      && LEFT.arrayPole[LEFT.N, LEFT.colom = LEFT.move3 - 1] != 1
                       && LEFT.arrayPole[LEFT.M, LEFT.colom = LEFT.move4 - 1] != 1)
                   {
                       LEFT.arrayPole.SetValue(color = 0, n, move1);
                       LEFT.arrayPole.SetValue(color = 0, m, move2);
                       LEFT.arrayPole.SetValue(color = 0, N, move3);
                       LEFT.arrayPole.SetValue(color = 0, M, move4);

                       LEFT.move1 = LEFT.move1 - 1;
                       LEFT.move2 = LEFT.move2 - 1;
                       LEFT.move3 = LEFT.move3 - 1;
                       LEFT.move4 = LEFT.move4 - 1;

                       LEFT.arrayPole.SetValue(color = 1, n, move1);
                       LEFT.arrayPole.SetValue(color = 1, m, move2);
                       LEFT.arrayPole.SetValue(color = 1, N, move3);
                       LEFT.arrayPole.SetValue(color = 1, M, move4);

                   }
               }
                 if (LEFT.FIG == 3 && LEFT.position == 4)
                 {
                     if (LEFT.move1 > 0
                        && LEFT.arrayPole[LEFT.n, LEFT.colom = LEFT.move1 - 1] != 1
                        && LEFT.arrayPole[LEFT.M, LEFT.colom = LEFT.move4 - 1] != 1)
                     {
                         LEFT.arrayPole.SetValue(color = 0, n, move1);
                         LEFT.arrayPole.SetValue(color = 0, m, move2);
                         LEFT.arrayPole.SetValue(color = 0, N, move3);
                         LEFT.arrayPole.SetValue(color = 0, M, move4);

                         LEFT.move1 = LEFT.move1 - 1;
                         LEFT.move2 = LEFT.move2 - 1;
                         LEFT.move3 = LEFT.move3 - 1;
                         LEFT.move4 = LEFT.move4 - 1;

                         LEFT.arrayPole.SetValue(color = 1, n, move1);
                         LEFT.arrayPole.SetValue(color = 1, m, move2);
                         LEFT.arrayPole.SetValue(color = 1, N, move3);
                         LEFT.arrayPole.SetValue(color = 1, M, move4);

                     }
                 }

                 if (LEFT.FIG == 4 && LEFT.position == 1)
                 {
                     if (LEFT.move1 > 0
                        && LEFT.arrayPole[LEFT.n, LEFT.colom = LEFT.move1 - 1] != 1
                        && LEFT.arrayPole[LEFT.m, LEFT.colom = LEFT.move2 - 1] != 1
                        && LEFT.arrayPole[LEFT.M, LEFT.colom = LEFT.move4 - 1] != 1)
                     {
                         LEFT.arrayPole.SetValue(color = 0, n, move1);
                         LEFT.arrayPole.SetValue(color = 0, m, move2);
                         LEFT.arrayPole.SetValue(color = 0, N, move3);
                         LEFT.arrayPole.SetValue(color = 0, M, move4);

                         LEFT.move1 = LEFT.move1 - 1;
                         LEFT.move2 = LEFT.move2 - 1;
                         LEFT.move3 = LEFT.move3 - 1;
                         LEFT.move4 = LEFT.move4 - 1;

                         LEFT.arrayPole.SetValue(color = 1, n, move1);
                         LEFT.arrayPole.SetValue(color = 1, m, move2);
                         LEFT.arrayPole.SetValue(color = 1, N, move3);
                         LEFT.arrayPole.SetValue(color = 1, M, move4);

                     }
                 }
                 if (LEFT.FIG == 4 && LEFT.position == 2)
                 {
                     if (LEFT.move2 > 0
                         && LEFT.arrayPole[LEFT.M, LEFT.colom = LEFT.move4 - 1] != 1
                         && LEFT.arrayPole[LEFT.m, LEFT.colom = LEFT.move2 - 1] != 1)
                     {
                         LEFT.arrayPole.SetValue(color = 0, n, move1);
                         LEFT.arrayPole.SetValue(color = 0, m, move2);
                         LEFT.arrayPole.SetValue(color = 0, N, move3);
                         LEFT.arrayPole.SetValue(color = 0, M, move4);

                         LEFT.move1 = LEFT.move1 - 1;
                         LEFT.move2 = LEFT.move2 - 1;
                         LEFT.move3 = LEFT.move3 - 1;
                         LEFT.move4 = LEFT.move4 - 1;

                         LEFT.arrayPole.SetValue(color = 1, n, move1);
                         LEFT.arrayPole.SetValue(color = 1, m, move2);
                         LEFT.arrayPole.SetValue(color = 1, N, move3);
                         LEFT.arrayPole.SetValue(color = 1, M, move4);

                     }
                 }
                 if (LEFT.FIG == 5 && LEFT.position == 1)
                 {
                     if (LEFT.move3 > 0
                         && LEFT.arrayPole[LEFT.n, LEFT.colom = LEFT.move1 - 1] != 1
                         && LEFT.arrayPole[LEFT.N, LEFT.colom = LEFT.move3 - 1] != 1
                          && LEFT.arrayPole[LEFT.M, LEFT.colom = LEFT.move4 - 1] != 1)
                     {
                         LEFT.arrayPole.SetValue(color = 0, n, move1);
                         LEFT.arrayPole.SetValue(color = 0, m, move2);
                         LEFT.arrayPole.SetValue(color = 0, N, move3);
                         LEFT.arrayPole.SetValue(color = 0, M, move4);

                         LEFT.move1 = LEFT.move1 - 1;
                         LEFT.move2 = LEFT.move2 - 1;
                         LEFT.move3 = LEFT.move3 - 1;
                         LEFT.move4 = LEFT.move4 - 1;

                         LEFT.arrayPole.SetValue(color = 1, n, move1);
                         LEFT.arrayPole.SetValue(color = 1, m, move2);
                         LEFT.arrayPole.SetValue(color = 1, N, move3);
                         LEFT.arrayPole.SetValue(color = 1, M, move4);

                     }
                 }
                 if (LEFT.FIG == 5 && LEFT.position == 2)
                 {
                     if (LEFT.move1 > 0
                         && LEFT.arrayPole[LEFT.n, LEFT.colom = LEFT.move1 - 1] != 1
                         && LEFT.arrayPole[LEFT.N, LEFT.colom = LEFT.move3 - 1] != 1)

                     {
                         LEFT.arrayPole.SetValue(color = 0, n, move1);
                         LEFT.arrayPole.SetValue(color = 0, m, move2);
                         LEFT.arrayPole.SetValue(color = 0, N, move3);
                         LEFT.arrayPole.SetValue(color = 0, M, move4);

                         LEFT.move1 = LEFT.move1 - 1;
                         LEFT.move2 = LEFT.move2 - 1;
                         LEFT.move3 = LEFT.move3 - 1;
                         LEFT.move4 = LEFT.move4 - 1;

                         LEFT.arrayPole.SetValue(color = 1, n, move1);
                         LEFT.arrayPole.SetValue(color = 1, m, move2);
                         LEFT.arrayPole.SetValue(color = 1, N, move3);
                         LEFT.arrayPole.SetValue(color = 1, M, move4);

                     }
                 }

                 if (LEFT.FIG == 6 && LEFT.position == 1)
                 {
                     if (LEFT.move4 > 0
                         && LEFT.arrayPole[LEFT.n, LEFT.colom = LEFT.move1 - 1] != 1
                         && LEFT.arrayPole[LEFT.m, LEFT.colom = LEFT.move2 - 1] != 1
                          && LEFT.arrayPole[LEFT.M, LEFT.colom = LEFT.move4 - 1] != 1)
                     {
                         LEFT.arrayPole.SetValue(color = 0, n, move1);
                         LEFT.arrayPole.SetValue(color = 0, m, move2);
                         LEFT.arrayPole.SetValue(color = 0, N, move3);
                         LEFT.arrayPole.SetValue(color = 0, M, move4);

                         LEFT.move1 = LEFT.move1 - 1;
                         LEFT.move2 = LEFT.move2 - 1;
                         LEFT.move3 = LEFT.move3 - 1;
                         LEFT.move4 = LEFT.move4 - 1;

                         LEFT.arrayPole.SetValue(color = 1, n, move1);
                         LEFT.arrayPole.SetValue(color = 1, m, move2);
                         LEFT.arrayPole.SetValue(color = 1, N, move3);
                         LEFT.arrayPole.SetValue(color = 1, M, move4);

                     }
                 }

                 if (LEFT.FIG == 6 && LEFT.position == 2)
                 {
                     if (LEFT.move4 > 0
                         && LEFT.arrayPole[LEFT.M, LEFT.colom = LEFT.move4 - 1] != 1
                         && LEFT.arrayPole[LEFT.n, LEFT.colom = LEFT.move1 - 1] != 1)
                     {
                         LEFT.arrayPole.SetValue(color = 0, n, move1);
                         LEFT.arrayPole.SetValue(color = 0, m, move2);
                         LEFT.arrayPole.SetValue(color = 0, N, move3);
                         LEFT.arrayPole.SetValue(color = 0, M, move4);

                         LEFT.move1 = LEFT.move1 - 1;
                         LEFT.move2 = LEFT.move2 - 1;
                         LEFT.move3 = LEFT.move3 - 1;
                         LEFT.move4 = LEFT.move4 - 1;

                         LEFT.arrayPole.SetValue(color = 1, n, move1);
                         LEFT.arrayPole.SetValue(color = 1, m, move2);
                         LEFT.arrayPole.SetValue(color = 1, N, move3);
                         LEFT.arrayPole.SetValue(color = 1, M, move4);

                     }
                 }
                 if (LEFT.FIG == 6 && LEFT.position == 3)
                 {
                     if (LEFT.move4 > 0
                         && LEFT.arrayPole[LEFT.M, LEFT.colom = LEFT.move4 - 1] != 1
                         && LEFT.arrayPole[LEFT.N, LEFT.colom = LEFT.move3 - 1] != 1
                         && LEFT.arrayPole[LEFT.n, LEFT.colom = LEFT.move1 - 1] != 1)
                     {
                         LEFT.arrayPole.SetValue(color = 0, n, move1);
                         LEFT.arrayPole.SetValue(color = 0, m, move2);
                         LEFT.arrayPole.SetValue(color = 0, N, move3);
                         LEFT.arrayPole.SetValue(color = 0, M, move4);

                         LEFT.move1 = LEFT.move1 - 1;
                         LEFT.move2 = LEFT.move2 - 1;
                         LEFT.move3 = LEFT.move3 - 1;
                         LEFT.move4 = LEFT.move4 - 1;

                         LEFT.arrayPole.SetValue(color = 1, n, move1);
                         LEFT.arrayPole.SetValue(color = 1, m, move2);
                         LEFT.arrayPole.SetValue(color = 1, N, move3);
                         LEFT.arrayPole.SetValue(color = 1, M, move4);

                     }
                 }

                 if (LEFT.FIG == 6 && LEFT.position == 4)
                 {
                     if (LEFT.move1 > 0
                         && LEFT.arrayPole[LEFT.n, LEFT.colom = LEFT.move1 - 1] != 1
                         && LEFT.arrayPole[LEFT.m, LEFT.colom = LEFT.move2 - 1] != 1)
                     {
                         LEFT.arrayPole.SetValue(color = 0, n, move1);
                         LEFT.arrayPole.SetValue(color = 0, m, move2);
                         LEFT.arrayPole.SetValue(color = 0, N, move3);
                         LEFT.arrayPole.SetValue(color = 0, M, move4);

                         LEFT.move1 = LEFT.move1 - 1;
                         LEFT.move2 = LEFT.move2 - 1;
                         LEFT.move3 = LEFT.move3 - 1;
                         LEFT.move4 = LEFT.move4 - 1;

                         LEFT.arrayPole.SetValue(color = 1, n, move1);
                         LEFT.arrayPole.SetValue(color = 1, m, move2);
                         LEFT.arrayPole.SetValue(color = 1, N, move3);
                         LEFT.arrayPole.SetValue(color = 1, M, move4);

                     }
                 }
                 if (LEFT.FIG == 7 && LEFT.position == 1)
                 {
                     if (LEFT.move1 > 0
                         && LEFT.arrayPole[LEFT.n, LEFT.colom = LEFT.move1 - 1] != 1
                         && LEFT.arrayPole[LEFT.m, LEFT.colom = LEFT.move2 - 1] != 1
                           && LEFT.arrayPole[LEFT.N, LEFT.colom = LEFT.move3 - 1] != 1)
                     {
                         LEFT.arrayPole.SetValue(color = 0, n, move1);
                         LEFT.arrayPole.SetValue(color = 0, m, move2);
                         LEFT.arrayPole.SetValue(color = 0, N, move3);
                         LEFT.arrayPole.SetValue(color = 0, M, move4);

                         LEFT.move1 = LEFT.move1 - 1;
                         LEFT.move2 = LEFT.move2 - 1;
                         LEFT.move3 = LEFT.move3 - 1;
                         LEFT.move4 = LEFT.move4 - 1;

                         LEFT.arrayPole.SetValue(color = 1, n, move1);
                         LEFT.arrayPole.SetValue(color = 1, m, move2);
                         LEFT.arrayPole.SetValue(color = 1, N, move3);
                         LEFT.arrayPole.SetValue(color = 1, M, move4);

                     }
                 }
                 if (LEFT.FIG == 7 && LEFT.position == 2)
                 {
                     if (LEFT.move1 > 0
                         && LEFT.arrayPole[LEFT.n, LEFT.colom = LEFT.move1 - 1] != 1
                         && LEFT.arrayPole[LEFT.M, LEFT.colom = LEFT.move4 - 1] != 1)
                     {
                         LEFT.arrayPole.SetValue(color = 0, n, move1);
                         LEFT.arrayPole.SetValue(color = 0, m, move2);
                         LEFT.arrayPole.SetValue(color = 0, N, move3);
                         LEFT.arrayPole.SetValue(color = 0, M, move4);

                         LEFT.move1 = LEFT.move1 - 1;
                         LEFT.move2 = LEFT.move2 - 1;
                         LEFT.move3 = LEFT.move3 - 1;
                         LEFT.move4 = LEFT.move4 - 1;

                         LEFT.arrayPole.SetValue(color = 1, n, move1);
                         LEFT.arrayPole.SetValue(color = 1, m, move2);
                         LEFT.arrayPole.SetValue(color = 1, N, move3);
                         LEFT.arrayPole.SetValue(color = 1, M, move4);

                     }
                 }
                 if (LEFT.FIG == 7 && LEFT.position == 3)
                 {
                     if (LEFT.move1 > 0
                         && LEFT.arrayPole[LEFT.n, LEFT.colom = LEFT.move1 - 1] != 1
                         && LEFT.arrayPole[LEFT.m, LEFT.colom = LEFT.move2 - 1] != 1
                         && LEFT.arrayPole[LEFT.N, LEFT.colom = LEFT.move3 - 1] != 1)
                     {
                         LEFT.arrayPole.SetValue(color = 0, n, move1);
                         LEFT.arrayPole.SetValue(color = 0, m, move2);
                         LEFT.arrayPole.SetValue(color = 0, N, move3);
                         LEFT.arrayPole.SetValue(color = 0, M, move4);

                         LEFT.move1 = LEFT.move1 - 1;
                         LEFT.move2 = LEFT.move2 - 1;
                         LEFT.move3 = LEFT.move3 - 1;
                         LEFT.move4 = LEFT.move4 - 1;

                         LEFT.arrayPole.SetValue(color = 1, n, move1);
                         LEFT.arrayPole.SetValue(color = 1, m, move2);
                         LEFT.arrayPole.SetValue(color = 1, N, move3);
                         LEFT.arrayPole.SetValue(color = 1, M, move4);

                     }
                 }
                 if (LEFT.FIG == 7 && LEFT.position == 4)
                 {
                     if (LEFT.move1 > 0
                         && LEFT.arrayPole[LEFT.n, LEFT.colom = LEFT.move1 - 1] != 1
                         && LEFT.arrayPole[LEFT.N, LEFT.colom = LEFT.move3 - 1] != 1)
                     {
                         LEFT.arrayPole.SetValue(color = 0, n, move1);
                         LEFT.arrayPole.SetValue(color = 0, m, move2);
                         LEFT.arrayPole.SetValue(color = 0, N, move3);
                         LEFT.arrayPole.SetValue(color = 0, M, move4);

                         LEFT.move1 = LEFT.move1 - 1;
                         LEFT.move2 = LEFT.move2 - 1;
                         LEFT.move3 = LEFT.move3 - 1;
                         LEFT.move4 = LEFT.move4 - 1;

                         LEFT.arrayPole.SetValue(color = 1, n, move1);
                         LEFT.arrayPole.SetValue(color = 1, m, move2);
                         LEFT.arrayPole.SetValue(color = 1, N, move3);
                         LEFT.arrayPole.SetValue(color = 1, M, move4);

                     }
                 }
        }