<commit_before>program Trollhunter;

uses
  SysUtils,
  Dialogs,
  GNUGetText in 'GNUGetText.pas',
  BearLibTerminal in 'BearLibTerminal.pas',
  BeaRLibItems in 'BeaRLibItems.pas',
  uTerminal in 'uTerminal.pas',
  uScenes in 'uScenes.pas',
  uPlayer in 'uPlayer.pas',
  uMap in 'uMap.pas',
  uItem in 'uItem.pas',
  uMob in 'uMob.pas',
  uGame in 'uGame.pas',
  uMsgLog in 'uMsgLog.pas',
  uCorpse in 'uCorpse.pas',
  uEntity in 'uEntity.pas',
  uCalendar in 'uCalendar.pas',
  uShop in 'uShop.pas';

var
  Key: Word = 0;
  IsRender: Boolean = True;

begin
  Game.LoadConfig;
  repeat
    if (Game.Timer > 0) then
    begin
      Game.Timer := Game.Timer - 1;
      if (Game.Timer = 0) then IsRender := True;
    end;
    if IsRender then
    begin
      Scenes.Render;
      Terminal.Refresh;
    end;
    Key := 0;
    if terminal_has_input() then
    begin
      Key := terminal_read();
      Scenes.Update(Key);
      IsRender := True;
      Continue;
    end;
    terminal_delay(10);
    IsRender := False;
  until Game.CanClose;

end.<commit_msg>"ReportMemoryLeaksOnShutdown" added.<commit_after>program Trollhunter;

uses
  SysUtils,
  Dialogs,
  GNUGetText in 'GNUGetText.pas',
  BearLibTerminal in 'BearLibTerminal.pas',
  BeaRLibItems in 'BeaRLibItems.pas',
  uTerminal in 'uTerminal.pas',
  uScenes in 'uScenes.pas',
  uPlayer in 'uPlayer.pas',
  uMap in 'uMap.pas',
  uItem in 'uItem.pas',
  uMob in 'uMob.pas',
  uGame in 'uGame.pas',
  uMsgLog in 'uMsgLog.pas',
  uCorpse in 'uCorpse.pas',
  uEntity in 'uEntity.pas',
  uCalendar in 'uCalendar.pas',
  uShop in 'uShop.pas';

var
  Key: Word = 0;
  IsRender: Boolean = True;

begin
  Randomize;
  {$IF COMPILERVERSION >= 18}
  ReportMemoryLeaksOnShutdown := True;
  {$IFEND}
  Game.LoadConfig;
  repeat
    if (Game.Timer > 0) then
    begin
      Game.Timer := Game.Timer - 1;
      if (Game.Timer = 0) then IsRender := True;
    end;
    if IsRender then
    begin
      Scenes.Render;
      Terminal.Refresh;
    end;
    Key := 0;
    if terminal_has_input() then
    begin
      Key := terminal_read();
      Scenes.Update(Key);
      IsRender := True;
      Continue;
    end;
    terminal_delay(10);
    IsRender := False;
  until Game.CanClose;

end.
{'fraction_non_alphanumeric': 0.11926192619261926, 'fraction_numerical': 0.0072007200720072, 'mean_word_length': 2.8195876288659796, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7100028', 'n_tokens_mistral': 860, 'n_tokens_neox': 842, 'n_words': 209}