Procedure ReadINI a SetValue

Zpět
procedure TAnt_hill.ReadINI;
var IniFile: TIniFile;
    cesta,pom : string;
begin
  cesta:=Application.ExeName;
  pom:=ExtractFilePath(cesta)+'INI_Files\option.ini';
  IniFile:=TIniFile.Create(pom);

  NUM_MRAVENEC:=IniFile.ReadInteger('Options','num_mravenec',30);
  NUM_VETVICEK:=IniFile.ReadInteger('Options','num_vetvicek',70);
  NUM_VET_V_MRAV:=IniFile.ReadInteger('Options','num_vet_v_mrav',50);
  NUM_EGGS := IniFile.ReadInteger('Options','num_eggs',5);
  ROZ_MRAVENISTE:=IniFile.ReadInteger('Options','roz_mraveniste',100);
  POSITION_ANT_HILL_X:=IniFile.ReadInteger('Options','positon_ant_hill_x',400);
  POSITION_ANT_HILL_Y:=IniFile.ReadInteger('Options','positon_ant_hill_y',320);
  IniFile.Free;
end;

procedure TAnt_Hill.Set_Value;
begin
  counter_hill := 0;
  curr_num_ants :=NUM_MRAVENEC;
  curr_num_ants_really := curr_num_ants;
  curr_num_woods := NUM_VETVICEK;
  curr_num_woods_really := NUM_VETVICEK;
  curr_num_woods_hill := NUM_VET_V_MRAV;
  curr_num_eggs := NUM_EGGS;
  curr_num_carried_woods := 0;
  curr_size_ant_hill := ROZ_MRAVENISTE;
  curr_pos_ant_hill_x := POSITION_ANT_HILL_X;
  curr_pos_ant_hill_y := POSITION_ANT_HILL_Y;
  SetLength(Data_Wood,curr_num_woods) ;
  SetLength(Data_Wood_Hill,curr_num_woods_hill) ;
  SetLength(Data_Ants,curr_num_ants);
  SetLength(Data_Egg,curr_num_eggs);
  control:=-1;
  Generation_Images ;
end;