pFigure.Enabled then
begin
for k:=1 to 4 do
for j:=1 to 4 do
if FigureWorkSheet[k][j]=1 then
if GlassWorkSheet[FigureWorkSheetPos div 20+k][FigureWorkSheetPos div 20+j+1]=1 then
begin
CanMoveRight:=False;
Break;
end;
if ((FigureWorkSheetPos+FigureHorizonMaxsize*20)<182)and CanMoveRight then
begin
ClearFigureWorkSheet;
FigureWorkSheetPos:=FigureWorkSheetPos+20;
FigureWorkSheetPos:=FigureWorkSheetPos+20;
DrawFigureWorkSheet;
end;
end;
13: //回车键旋转 这是核心代码,数组下标的转化很复杂.
if tmrDropFigure.Enabled then
begin
if ((FigureWorkSheetPos+FigureHorizonMaxSize*20)<461) and
((FigureWorkSheetPos+FigureVerticalMaxsize*20)<202) then
begin
ClearFigureWorkSheet;
TempFigureWorkSheet:=FigureWorkSheet;
TempFigureHorizonMaxSize:=FigureHorizonMaxSize;
InitialFigureWorkSheet;
for j:=1 to 4 do
for k:=1 to 4 do
if TempFigureWorkSheet[k][5-j]=1 then
begin
&nb