public void FigureRestore(FigureTemp figureTmp) { for (var i = 0; i < figureTmp.X.Length; i++) { X[i] = figureTmp.X[i]; Y[i] = figureTmp.Y[i]; } }
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); } }