public bool CreateNewFigure()
{
if (showNewBlock)
{
// Generate new figure's shape
DynamicFigureNumber = nextFigures.Dequeue();
nextFigures.Enqueue(random.Next(7));
DynamicFigureModificationNumber = nextFiguresModification.Dequeue();
nextFiguresModification.Enqueue(random.Next(4));
DynamicFigureColor = DynamicFigureNumber;
// Position and coordinates for new dynamic figure
PositionForDynamicFigure = StartPositionForNewFigure;
for (int i = 0; i < BlocksCountInFigure; i++)
DynamicFigure[i] = Figures[DynamicFigureNumber, DynamicFigureModificationNumber, i] +
PositionForDynamicFigure;
if (!DrawFigureOnBoard(DynamicFigure, DynamicFigureColor))
return false;
showNewBlock = false;
}
return true;
}
bool DrawFigureOnBoard(Vector2[] vector, int color)