<commit_before><!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="url" content="https://sandbox.collinhaines.com/terminal/">

  <meta name="application-name" content="Terminal">
  <meta name="description" content="Inspired by the hacking mini-game within the latest installments of the Fallout series.">

  <!-- It'd be cool to actually have native words. -->
  <meta name="google" content="notranslate">

  <meta name="twitter:card" content="summary">
  <meta name="twitter:site" content="@collinhaines">
  <meta name="twitter:creator" content="@collinhaines">
  <meta name="twitter:url" content="https://sandbox.collinhaines.com/terminal/">
  <meta name="twitter:title" content="Terminal Game">
  <meta name="twitter:description" content="Inspired by the hacking mini-game within the latest installments of the Fallout series.">
  <!-- TODO: twitter:image -->

  <title>Terminal Game</title>

  <link rel="stylesheet" href="css/bootstrap-3.3.7.min.css">
  <link rel="stylesheet" href="css/terminal-0.2.0.min.css">
</head>
<body>
  <div class="container main-area">
    <samp class="fixed-width center-block" id="information">
      <p>Welcome to ROBCO Industries (TM) Termlink</p>

      <p>Password Required</p>

      <p>Attempts Remaining:
        <span id="attempts"></span>
      </p>
    </samp>

    <samp class="fixed-width center-block clearfix">
      <div class="column pointers" id="pointer-1"></div>

      <div class="column text" id="text-1"></div>

      <div class="column pointers" id="pointer-2"></div>

      <div class="column text" id="text-2"></div>

      <div class="column results" id="results"></div>
    </samp>

    <samp class="small-screen">
      <p>!! Danger !!</p>

      <p>Unsupported technology detected.</p>

      <p>Advise to switch to a more stable device.</p>

      <p>- ROBCO Industries (TM)</p>
    </samp>
  </div>

  <script src="js/jquery-3.1.1.min.js"></script>
  <script src="js/platform-1.3.3.min.js"></script>
  <script src="js/terminal-0.2.0.min.js"></script>
  <script>
    // Construct.
    const utils    = new Utils();
    const visuals  = new Visuals();
    const renderer = new Renderer();
    const terminal = new Terminal();

    // Attach exterior classes.
    renderer.setUtils(utils);

    terminal.setUtils(utils);

    visuals.setTerminal(terminal);
    visuals.setRenderer(renderer);
    visuals.setUtils(utils);

    // Render the pointers.
    renderer.renderPointers(terminal.generatePointers());

    // Render the attempts.
    renderer.renderAttempts(terminal.getAttempts());

    // Render characters.
    renderer.renderCharacters($('#text-1'), terminal.getRows(), terminal.getColumns());
    renderer.renderCharacters($('#text-2'), terminal.getRows(), terminal.getColumns());

    // Generate words.
    terminal.generateWords($.ajax({
      async: false,
      url:   'words.json'
    }).responseJSON);

    // Generate the password.
    terminal.generatePassword();

    // Render the words on the board.
    renderer.renderWords(terminal.getWords(), terminal.getRows(), terminal.getColumns());

    // Render the surrounding characters.
    renderer.renderSurrounders(terminal.getWords(), terminal.getRows(), terminal.getColumns());

    // Render the output to the side of the board.
    renderer.renderOutput(terminal.getRows());

    // Create event listeners.
    visuals.attachEventListeners();

    // TODO: Detect Android tablets.
    const tablets = ['iPad', 'Kindle', 'Kindle Fire'];

    // Alert tablet users the arrow functionality is "broken".
    // There's probably a way to actually detect if an external keyboard is
    // hooked up to a tablet.
    if (tablets.indexOf(platform.product) > -1) {
      $('<p>!! Warning !!</p><p>External Keyboard Not Found. Limited Usage Probable</p>').insertAfter($('#information > p:first-child'));
    }
  </script>
</body>
</html><commit_msg>Added Main Logging<commit_after><!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="url" content="https://sandbox.collinhaines.com/terminal/">

  <meta name="application-name" content="Terminal">
  <meta name="description" content="Inspired by the hacking mini-game within the latest installments of the Fallout series.">

  <!-- It'd be cool to actually have native words. -->
  <meta name="google" content="notranslate">

  <meta name="twitter:card" content="summary">
  <meta name="twitter:site" content="@collinhaines">
  <meta name="twitter:creator" content="@collinhaines">
  <meta name="twitter:url" content="https://sandbox.collinhaines.com/terminal/">
  <meta name="twitter:title" content="Terminal Game">
  <meta name="twitter:description" content="Inspired by the hacking mini-game within the latest installments of the Fallout series.">
  <!-- TODO: twitter:image -->

  <title>Terminal Game</title>

  <link rel="stylesheet" href="css/bootstrap-3.3.7.min.css">
  <link rel="stylesheet" href="css/terminal-0.2.0.min.css">
</head>
<body>
  <div class="container main-area">
    <samp class="fixed-width center-block" id="information">
      <p>Welcome to ROBCO Industries (TM) Termlink</p>

      <p>Password Required</p>

      <p>Attempts Remaining:
        <span id="attempts"></span>
      </p>
    </samp>

    <samp class="fixed-width center-block clearfix">
      <div class="column pointers" id="pointer-1"></div>

      <div class="column text" id="text-1"></div>

      <div class="column pointers" id="pointer-2"></div>

      <div class="column text" id="text-2"></div>

      <div class="column results" id="results"></div>
    </samp>

    <samp class="small-screen">
      <p>!! Danger !!</p>

      <p>Unsupported technology detected.</p>

      <p>Advise to switch to a more stable device.</p>

      <p>- ROBCO Industries (TM)</p>
    </samp>
  </div>

  <script src="js/jquery-3.1.1.min.js"></script>
  <script src="js/platform-1.3.3.min.js"></script>
  <script src="js/terminal-0.2.0.min.js"></script>
  <script>
    console.info('Initializing.');

    // Construct.
    const utils    = new Utils();
    const visuals  = new Visuals();
    const renderer = new Renderer();
    const terminal = new Terminal();

    console.info('Mapping classes together.');

    // Attach exterior classes.
    renderer.setUtils(utils);

    terminal.setUtils(utils);

    visuals.setTerminal(terminal);
    visuals.setRenderer(renderer);
    visuals.setUtils(utils);

    console.info('Rendering pointers.');

    // Render the pointers.
    renderer.renderPointers(terminal.generatePointers());

    console.info('Rendering attempts.');

    // Render the attempts.
    renderer.renderAttempts(terminal.getAttempts());

    console.info('Rendering characters.');

    // Render characters.
    renderer.renderCharacters($('#text-1'), terminal.getRows(), terminal.getColumns());
    renderer.renderCharacters($('#text-2'), terminal.getRows(), terminal.getColumns());

    console.info('Generating words.');

    // Generate words.
    terminal.generateWords($.ajax({
      async: false,
      url:   'words.json'
    }).responseJSON);

    console.info('Generating password.');

    // Generate the password.
    terminal.generatePassword();

    console.info('Rendering words.');

    // Render the words on the board.
    renderer.renderWords(terminal.getWords(), terminal.getRows(), terminal.getColumns());

    console.info('Rendering character blocks.');

    // Render the surrounding characters.
    renderer.renderSurrounders(terminal.getWords(), terminal.getRows(), terminal.getColumns());

    console.info('Rendering output column.');

    // Render the output to the side of the board.
    renderer.renderOutput(terminal.getRows());

    console.info('Attaching event listeners.');

    // Create event listeners.
    visuals.attachEventListeners();

    // TODO: Detect Android tablets.
    const tablets = ['iPad', 'Kindle', 'Kindle Fire'];

    // Alert tablet users the arrow functionality is "broken".
    // There's probably a way to actually detect if an external keyboard is
    // hooked up to a tablet.
    if (tablets.indexOf(platform.product) > -1) {
      $('<p>!! Warning !!</p><p>External Keyboard Not Found. Limited Usage Probable</p>').insertAfter($('#information > p:first-child'));
    }
  </script>
</body>
</html>
{'fraction_non_alphanumeric': 0.164966584593739, 'fraction_numerical': 0.005627857896588111, 'mean_word_length': 3.5934302638664515, 'pattern_counts': {'":': 0, '<': 147, '<?xml version=': 0, '>': 151, 'https://': 4, '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': '1290886', 'n_tokens_mistral': 2711, 'n_tokens_neox': 2569, 'n_words': 620}