DrawFigureWorkSheet;
Randomize;
RandomNum:=Random(7);
case RandomNum of
0:begin
NextFigureType:=ftTriada;
Move(Triada,NextFigureWorkSheet,SizeOf(NextFigureWorkSheet));
end;
1:begin
NextFigureType:=ftLCorner;
Move(LCorner,NextFigureWorkSheet,SizeOf(NextFigureWorkSheet));
end;
2:begin
NextFigureType:=ftRCorner;
Move(RCorner,NextFigureWorkSheet,SizeOf(NextFigureWorkSheet));
end;
3:begin
NextFigureType:=ftLZigzag;
Move(LZigzag,NextFigureWorkSheet,SizeOf(NextFigureWorkSheet));
end;
4:begin
NextFigureType:=ftRZigzag;
Move(RZigzag,NextFigureWorkSheet,SizeOf(NextFigureWorkSheet));
end;
5:begin
NextFigureType:=ftStick;
Move(Stick,NextFigureWorkSheet,SizeOf(NextFigureWorkSheet));
end;
6:begin
NextFigureType:=ftBox;
Move(Box,NextFigureWorkSheet,SizeOf(NextFigureWorkSheet));
end;
end;
NextFigureColor:=RandomFigureColor;
DrawNextFigureWorkSheet;
end;
procedure TForm1.DrawFigureWorkSheet;
var
i,j:Integer;
x1,x2,y1,y2:Integer;
newrect:TRect;
begin
for i:=1 to 4 do
for j:=1 to 4 do
begin
if FigureWorkSheet[i][j]=1 then
if GlassWorkSheet[i][4+j]=1 then
begin
tmrDropFigure.Enabled:=False;
ClearNextFigureWorkSheet;
//NextFigureType:=ftNull;
Form2.Show;
&