1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78:
| procedure TForm1.FormCreate(Sender: TObject); var w :Integer; begin With Spielfeld.Canvas do begin Brush.Color := HFarbe; pen.Width := 10; pen.Style := psSolid; brush.Style := bsSolid; pen.Color := RFarbe; Rectangle(0,0,Spielfeld.Width,Spielfeld.Height); Spielfeld.Canvas.Rectangle(0,0,Spielfeld.Width,Spielfeld.Height); end;
SetLength(Wall,22);
Wall[0].x :=80; Wall[0].y :=160; Wall[1].x :=100; Wall[1].y :=160; Wall[2].x :=120; Wall[2].y :=160; Wall[3].x :=140; Wall[3].y :=160; Wall[4].x :=160; Wall[4].y :=160; Wall[5].x :=180; Wall[5].y :=160; Wall[6].x :=180; Wall[6].y :=140; Wall[7].x :=180; Wall[7].y :=120; Wall[8].x :=180; Wall[8].y :=100; Wall[9].x :=180; Wall[9].y :=80; Wall[10].x :=180; Wall[10].y :=60; Wall[11].x :=320; Wall[11].y :=60; Wall[12].x :=320; Wall[12].y :=80; Wall[13].x :=320; Wall[13].y :=100; Wall[14].x :=320; Wall[14].y :=120; Wall[15].x :=320; Wall[15].y :=140; Wall[16].x :=320; Wall[16].y :=160; Wall[17].x :=340; Wall[17].y :=160; Wall[18].x :=360; Wall[18].y :=160; Wall[19].x :=380; Wall[19].y :=160; Wall[20].x :=400; Wall[20].y :=160; Wall[21].x :=420; Wall[21].y :=160;
for w:= 0 to High(Wall) do begin pen.Width := 10; pen.Color := RFarbe; Rectangle(Wall[w].x -5,Wall[w].y -5,Wall[w].x +5,Wall[w].y +5); pen.Color := HFarbe; Pixels[0,0] := HFarbe; Rectangle(Wall[w].x -3,Wall[w].y -3,Wall[w].x +3,Wall[w].y +3); pen.Width := 1; pen.Color := RFarbe; MoveTo(Wall[w].x -5,Wall[w].y -5); LineTo(Wall[w].x +5,Wall[w].y +5); MoveTo(Wall[w].x -5,Wall[w].y +5); LineTo(Wall[w].x +5,Wall[w].y -5); end; |