| 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:
 
 | typeTForm2 = class(TForm)
 Panel1: TPanel;
 Field: TImage;
 private
 Shapes: array of TShape;
 public
 Madn: TMadn;
 end;
 
 var
 Form2: TForm2;
 count: byte;
 
 implementation
 
 uses UFigure;
 
 {$R *.dfm}
 
 procedure TForm2.CreateShapes(n: word; wc: TWinControl);
 begin
 SetLength(Shapes, n);
 Field.Parent := Form2;
 while n > 0 do
 begin
 Shapes[n] := TShape.Create(Self);
 Shapes[n].Parent := wc;
 case n of
 1,2,3,4: Shapes[n].Brush.Color := rgb(255,0,0);
 5,6,7,8: Shapes[n].Brush.Color := RGB(255,216,0);
 9,10,11,12: Shapes[n].Brush.Color := RGB(0,148,255);
 13,14,15,16: Shapes[n].Brush.Color := RGB(58,196,0);
 end;
 Shapes[n].Shape := stcircle;
 Shapes[n].Height := 30;
 Shapes[n].Width := 30;
 Shapes[n].Left := UMadn.Start[n].X;
 Shapes[n].Top := UMadn.Start[n].Y;
 Shapes[n].Pen.Width := 3;
 Shapes[n].Visible := true;
 Shapes[n].Enabled := false;
 n := n-1;
 end;
 end;
 |