public void MoveFigureLeft()
{
// Sorting blocks fro dynamic figure to correct moving
SortingVector2(ref DynamicFigure, true, DynamicFigure.GetLowerBound(0),
DynamicFigure.GetUpperBound(0));
// Check colisions
for (int i = 0; i < BlocksCountInFigure; i++)
{
if ((DynamicFigure[i].X == 0))
return;
if (boardFields[(int)DynamicFigure[i].X - 1, (int)DynamicFigure[i].Y] == FieldState.Static)
return;
}
// Move figure on board
for (int i = 0; i < BlocksCountInFigure; i++)
{
boardFields[(int)DynamicFigure[i].X - 1, (int)DynamicFigure[i].Y] =
boardFields[(int)DynamicFigure[i].X, (int)DynamicFigure[i].Y];
BoardColor[(int)DynamicFigure[i].X - 1, (int)DynamicFigure[i].Y] =
BoardColor[(int)DynamicFigure[i].X, (int)DynamicFigure[i].Y];
ClearBoardField((int)DynamicFigure[i].X, (int)DynamicFigure[i].Y);
// Change position for blocks in DynamicFigure
DynamicFigure[i].X = DynamicFigure[i].X - 1;
}
// Change position vector
//if (PositionForDynamicFigure.X > 0)
PositionForDynamicFigure.X--;
}