Exemplo n.º 1
0
 //Движение влево
 void MoveLeft()
 {
     int [,] tmp = new int[heightTable, widthTable];
     for (int y = 0; y < heightTable; y++)
     {
         for (int x = 0; x < widthTable; x++)
         {
             if (table [y, x] == 1 || table [y, x] == 3)
             {
                 if (x == 0)
                 {
                     return;
                 }
                 if (table [y, x - 1] == 2)
                 {
                     return;
                 }
                 tmp [y, x - 1] = table [y, x];
             }
             if (table [y, x] == 2)
             {
                 tmp [y, x] = 2;
             }
         }
     }
     table = tmp;
     figure.DeductXCoord();
 }