Hallo
Es ist wieder ein Problem erschienn aber diesmal liegt es an mir ich erkenne den Felher nicht
Delphi-Quellcode:
procedure THaupt.Neufallen;
var
i :integer;
kannbewegen : boolean;
begin
Form2.Spielfeld.Canvas.Brush.Color := clwhite;
Form2.Spielfeld.Canvas.Brush.Style := bssolid;
Form2.Spielfeld.Canvas.Rectangle(0,0,form2.Spielfeld.Width, form2.Spielfeld.Height);
kannbewegen:= false;
for i := 0 to high(Block) do
begin
if (i<>high(block)-3) and (i<>high(block)-2) and (i<>high(block)-1) and (i<>high(block)-0) then
begin
if not (Block[high(Block)-3].fPosition.y +1 = Block[i].fPosition.y) and (Block[high(Block)-3].fPosition.y +1 <>0) then
begin
if not (Block[high(Block)-2].fPosition.y +1 = Block[i].fPosition.y) and (Block[high(Block)-2].fPosition.y +1 <>0) then
begin
if not (Block[high(Block)-1].fPosition.y +1 = Block[i].fPosition.y) and (Block[high(Block)-1].fPosition.y +1 <>0) then
begin
if not (Block[high(Block)-0].fPosition.y +1 = Block[i].fPosition.y) and (Block[high(Block)-0].fPosition.y +1 <>0) then
begin
kannbewegen:= true;
end;
end;
end;
end;
end;
end;
if kannbewegen then
begin
Block[high(Block)-3].fPosition.Y := Block[high(Block)-3].fPosition.Y +1 ;
Block[high(Block)-2].fPosition.Y := Block[high(Block)-2].fPosition.Y +1 ;
Block[high(Block)-1].fPosition.Y := Block[high(Block)-1].fPosition.Y +1 ;
Block[high(Block)].fPosition.Y := Block[high(Block)].fPosition.Y +1 ;
end;
for i := 0 to high(Block) do
begin
Block[i].zeichen;
end;
if not kannbewegen then neu;
Die Blöcke fallen nicht sondern werden sofort neu erzeugt?