Пример #1
0
 public void FigureRestore(FigureTemp figureTmp)
 {
     for (var i = 0; i < figureTmp.X.Length; i++)
     {
         X[i] = figureTmp.X[i];
         Y[i] = figureTmp.Y[i];
     }
 }
Пример #2
0
        static public void Rotate(Figures figure)
        {
            FigureTemp figureTmp = new FigureTemp(figure);

            field.DeleteFigureFromField(figure);
            figure.Rotate();
            if (field.TestRotationInField(figure))
            {
                field.PasteFigureInField(figure);
            }
            else
            {
                figure.FigureRestore(figureTmp);
                field.PasteFigureInField(figure);
            }
        }