<commit_before><% content_for :body_tag, 'data-no-turbolink' %>
<div class="row">

    <div class="col-md-4 code-wrapper">

        <div class="row code-controls pull-right">
            <button class="btn btn-xs" id="fullScreenBtn" data-toggle="tooltip" data-placement="right" title="Editor im Vollbildmodus anzeigen">
                <span class="glyphicon glyphicon-resize-full"></span>
            </button>
            <div class="btn-group">
                <button type="button" class="btn btn-warning dropdown-toggle pull-right" id="watchlist-dropdown" data-toggle="dropdown">Beobachtete Variablen<span class="caret"></span>
                </button>
                <ul class="dropdown-menu" id='watchlist'>
                    <div id="watchlist-default">Mache einen Doppelklick auf Variablen zum Beobachten der Werte</div>
                </ul>
                <div id="watchlist-size">0</div>
            </div>


            <div class="btn-group">
                <button id="runBtn" type="button" class="btn btn-success">
                    <span class="glyphicon glyphicon-play"> </span>Ausführen</button>
                <button id="runNStopBtn" type="button" class="btn btn-success"><span class="glyphicon glyphicon-step-forward sm"></span></button>
            </div>

        </div>
        <div class="row code-controls pull-right hidden" id="disabled-state-controls">
            <button class="btn btn-default" id="resetBtn">
                <span class="glyphicon glyphicon-step-backward"> </span> Zurücksetzen
            </button>
            <button class="btn btn-default" id="stopBtn">
                <span class="glyphicon glyphicon-stop"> </span> Stop
            </button>
            <!--<button class="btn btn-default" id="pauseBtn">-->
            <!--<span class="glyphicon glyphicon-pause"> </span> Pause-->
            <!--</button>-->
            <button class="btn btn-default" id="resumeBtn" style="display: none">
                <span class="glyphicon glyphicon-play"> </span> Weiter
            </button>
            <div class="btn-group">
                <button id="stepBtn" type="button" class="btn btn-default" disabled>
                    <span class="glyphicon glyphicon-step-forward"> </span> Schritt
                </button>
                <button id="jumpBtn" type="button" class="btn btn-default" disabled>
                    <span class="glyphicon glyphicon-share-alt"> </span></span>
                </button>
            </div>
        </div>
        <div class="clearfix"></div>
        <div class="row">

            <!-- no indentation because CodeMirror would display it -->
            <textarea id="codemirror" style="display: none"><%= @language.default_code %></textarea>

            <div id="codeMirror-loading">
                <%= image_tag 'ajax-loader.gif' %> Lade Daten
            </div>
        </div>
    </div>
    <div class="col-md-8 grid-wrapper">
        <div class="grid-controls">
            <div class="speed-controls">
                Geschwindigkeit:
                <span id="simulationSpeed"></span>

                <div id="speedSlider" style="width: 200px"></div>
            </div>


            <div class="btn-group serialization-controls">
                <btn class="btn btn-default" id="serialization-trigger" data-toggle="modal" data-target="#serialization-modal">
                    <span class="glyphicon glyphicon-floppy-disk"> </span>
                </btn>
            </div>
            <div class="btn-group gameObject-controls">
                <button class=" btn btn-default" id="addTreasure">
                    <%= image_tag 'frank/treasure.gif', size: '18' %> Schatz
                </button>
                <button class=" btn btn-default" id="addMonster">
                    <%= image_tag 'frank/monster.gif', size: '18' %> Kraken
                </button>
                <button class=" btn btn-default" id="addWave">
                    <%= image_tag 'frank/wave.gif', size: '18'%> Welle
                </button>
            </div>
        </div>

        <div id="gridData" style="display: none" hidden>
            {
            "width":22,
            "height":10,
            "objects":[],
            "ship":{
            "name":"ship",
            "x":5,
            "y":3,
            "rotation":0
            }
            }
        </div>
        <!-- Grid borders add an offset of 1 pixel -->
        <canvas width="729" height="321" id="pirateGrid">Your browser is not supported!</canvas>
    </div>
</div>
<div class="row">
    <div class="col-md-4">
        <h4>Beobachtete Variablen</h4>

        <div id="watchlistDebugger">
            <table class="table table-hover table-condensed table-striped table-responsive">
                <thead>
                <tr>
                    <th>Variable</th>
                    <th>Belegung</th>
                </tr>
                </thead>
                <tbody> <%# Required to properly set allocations the first time %>
                </tbody>
            </table>
        </div>
    </div>
    <div class="col-md-8">
        <h4>
            <%= t("game.console.label") %>
            <span class="pull-right glyphicon glyphicon-trash" id="clearConsoleBtn" title="Konsole leeren"></span>
        </h4>

        <div name="console" id="console"></div>
    </div>
</div>

<!-- Serialization Modal -->
<div class="modal fade" id="serialization-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="myModalLabel">Laden und Speichern</h4>
            </div>
            <div class="modal-body">
                <div class="row">
                    <div class="col-md-6">
                        <h4>Code</h4>

                        <div class="btn-group">
                            <a class="btn btn-success" id="save-code">
                                <span class="glyphicon glyphicon-floppy-save"> speichern</span>
                            </a>

                            <a class="btn btn-primary" id="load-code">
                                <span class="glyphicon glyphicon-floppy-open"> laden</span>
                            </a>
                        </div>
                    </div>
                    <div class="col-md-6">
                        <h4>Spielwelt</h4>

                        <div class="btn-group">
                            <a class="btn btn-success" id="save-grid">
                                <span class="glyphicon glyphicon-floppy-save"> speichern</span>
                            </a>

                            <a class="btn btn-primary" id="load-grid">
                                <span class="glyphicon glyphicon-floppy-open"> laden</span>
                            </a>
                        </div>
                    </div>
                    <!--<input type="file" id="fileUploader" style="display: none">-->
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">Schließen</button>
            </div>
        </div>
    </div>
</div>



<div id="imagePreloader" style="display: none" hidden></div>

<% content_for :html_header, javascript_include_tag('pirates/simulation', 'data-turbolinks-track' => false) %>
<%= stylesheet_link_tag 'game' %>

<% @language.stylesheet_assets.each do | stylesheet | %>
  <%= stylesheet_link_tag stylesheet %>
<% end %>

<script>
  var config = {
    language: {
      id: '<%= @id %>',
      name: '<%= @language.name %>',
      fileExtension: '<%= @language.file_extension %>'
    },
    saveToLocalStorage: true,
    maxSimulationSpeed: 120, // time in ticks between each action
    images: {
      buoy: "<%= asset_path 'frank/buoy.gif' %>",
      ship: "<%= asset_path 'frank/ship.gif' %>",
      wave: "<%= asset_path 'frank/wave.gif' %>",
      treasure: "<%= asset_path 'frank/treasure.gif' %>",
      monster: "<%= asset_path 'frank/monster.gif' %>"
    },
    codemirror: {
      lineNumbers: true,
      autofocus: true,
      tabMode: 'spaces',
      enterMode: 'spaces',
      theme: 'monokai',
      keymap: 'sublime',
      styleActiveLine: true
    },
    lineColor: '#999',
    cellHighlighting: {
      hovered: 'rgba(0,0,0,0.1)',
      look: 'rgba(255,0,0,0.2)'
    },
    maxCodeLength: 10000
  };

  config = jQuery.extend(true, config, jQuery.parseJSON('<%= raw @language.gui_options.to_json %>'));
  window.Config = config

  var scripts = [
    "<%= javascript_path 'pirates/utilities' %>",
    "<%= javascript_path 'pirates/console' %>",
    "<%= javascript_path 'pirates/socketHandler' %>",
    "<%= javascript_path 'pirates/gameObjects' %>",
    "<%= javascript_path 'pirates/codegui' %>",
    "<%= javascript_path 'pirates/grid' %>"
  ];

  <% @language.script_assets.each do |script| %>
    scripts.push('<%= asset_path script %>');
  <% end %>
//  console.log('scripts to preload:', scripts);

  window.onload = function() { // wait until DOM is ready
    Simulation.preload(scripts, function() { // firefox won't draw without
      Simulation.initialize();
      Simulation.mainLoop();
    });

  }
</script>
<commit_msg>remove unnessesary span<commit_after><% content_for :body_tag, 'data-no-turbolink' %>
<div class="row">

    <div class="col-md-4 code-wrapper">

        <div class="row code-controls pull-right">
            <button class="btn btn-xs" id="fullScreenBtn" data-toggle="tooltip" data-placement="right" title="Editor im Vollbildmodus anzeigen">
                <span class="glyphicon glyphicon-resize-full"></span>
            </button>
            <div class="btn-group">
                <button type="button" class="btn btn-warning dropdown-toggle pull-right" id="watchlist-dropdown" data-toggle="dropdown">Beobachtete Variablen<span class="caret"></span>
                </button>
                <ul class="dropdown-menu" id='watchlist'>
                    <div id="watchlist-default">Mache einen Doppelklick auf Variablen zum Beobachten der Werte</div>
                </ul>
                <div id="watchlist-size">0</div>
            </div>


            <div class="btn-group">
                <button id="runBtn" type="button" class="btn btn-success">
                    <span class="glyphicon glyphicon-play"> </span>Ausführen</button>
                <button id="runNStopBtn" type="button" class="btn btn-success"><span class="glyphicon glyphicon-step-forward sm"></span></button>
            </div>

        </div>
        <div class="row code-controls pull-right hidden" id="disabled-state-controls">
            <button class="btn btn-default" id="resetBtn">
                <span class="glyphicon glyphicon-step-backward"> </span> Zurücksetzen
            </button>
            <button class="btn btn-default" id="stopBtn">
                <span class="glyphicon glyphicon-stop"> </span> Stop
            </button>
            <!--<button class="btn btn-default" id="pauseBtn">-->
            <!--<span class="glyphicon glyphicon-pause"> </span> Pause-->
            <!--</button>-->
            <button class="btn btn-default" id="resumeBtn" style="display: none">
                <span class="glyphicon glyphicon-play"> </span> Weiter
            </button>
            <div class="btn-group">
                <button id="stepBtn" type="button" class="btn btn-default" disabled>
                    <span class="glyphicon glyphicon-step-forward"> </span> Schritt
                </button>
                <button id="jumpBtn" type="button" class="btn btn-default" disabled>
                    <span class="glyphicon glyphicon-share-alt"> </span>
                </button>
            </div>
        </div>
        <div class="clearfix"></div>
        <div class="row">

            <!-- no indentation because CodeMirror would display it -->
            <textarea id="codemirror" style="display: none"><%= @language.default_code %></textarea>

            <div id="codeMirror-loading">
                <%= image_tag 'ajax-loader.gif' %> Lade Daten
            </div>
        </div>
    </div>
    <div class="col-md-8 grid-wrapper">
        <div class="grid-controls">
            <div class="speed-controls">
                Geschwindigkeit:
                <span id="simulationSpeed"></span>

                <div id="speedSlider" style="width: 200px"></div>
            </div>


            <div class="btn-group serialization-controls">
                <btn class="btn btn-default" id="serialization-trigger" data-toggle="modal" data-target="#serialization-modal">
                    <span class="glyphicon glyphicon-floppy-disk"> </span>
                </btn>
            </div>
            <div class="btn-group gameObject-controls">
                <button class=" btn btn-default" id="addTreasure">
                    <%= image_tag 'frank/treasure.gif', size: '18' %> Schatz
                </button>
                <button class=" btn btn-default" id="addMonster">
                    <%= image_tag 'frank/monster.gif', size: '18' %> Kraken
                </button>
                <button class=" btn btn-default" id="addWave">
                    <%= image_tag 'frank/wave.gif', size: '18'%> Welle
                </button>
            </div>
        </div>

        <div id="gridData" style="display: none" hidden>
            {
            "width":22,
            "height":10,
            "objects":[],
            "ship":{
            "name":"ship",
            "x":5,
            "y":3,
            "rotation":0
            }
            }
        </div>
        <!-- Grid borders add an offset of 1 pixel -->
        <canvas width="729" height="321" id="pirateGrid">Your browser is not supported!</canvas>
    </div>
</div>
<div class="row">
    <div class="col-md-4">
        <h4>Beobachtete Variablen</h4>

        <div id="watchlistDebugger">
            <table class="table table-hover table-condensed table-striped table-responsive">
                <thead>
                <tr>
                    <th>Variable</th>
                    <th>Belegung</th>
                </tr>
                </thead>
                <tbody> <%# Required to properly set allocations the first time %>
                </tbody>
            </table>
        </div>
    </div>
    <div class="col-md-8">
        <h4>
            <%= t("game.console.label") %>
            <span class="pull-right glyphicon glyphicon-trash" id="clearConsoleBtn" title="Konsole leeren"></span>
        </h4>

        <div name="console" id="console"></div>
    </div>
</div>

<!-- Serialization Modal -->
<div class="modal fade" id="serialization-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="myModalLabel">Laden und Speichern</h4>
            </div>
            <div class="modal-body">
                <div class="row">
                    <div class="col-md-6">
                        <h4>Code</h4>

                        <div class="btn-group">
                            <a class="btn btn-success" id="save-code">
                                <span class="glyphicon glyphicon-floppy-save"> speichern</span>
                            </a>

                            <a class="btn btn-primary" id="load-code">
                                <span class="glyphicon glyphicon-floppy-open"> laden</span>
                            </a>
                        </div>
                    </div>
                    <div class="col-md-6">
                        <h4>Spielwelt</h4>

                        <div class="btn-group">
                            <a class="btn btn-success" id="save-grid">
                                <span class="glyphicon glyphicon-floppy-save"> speichern</span>
                            </a>

                            <a class="btn btn-primary" id="load-grid">
                                <span class="glyphicon glyphicon-floppy-open"> laden</span>
                            </a>
                        </div>
                    </div>
                    <!--<input type="file" id="fileUploader" style="display: none">-->
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">Schließen</button>
            </div>
        </div>
    </div>
</div>



<div id="imagePreloader" style="display: none" hidden></div>

<% content_for :html_header, javascript_include_tag('pirates/simulation', 'data-turbolinks-track' => false) %>
<%= stylesheet_link_tag 'game' %>

<% @language.stylesheet_assets.each do | stylesheet | %>
  <%= stylesheet_link_tag stylesheet %>
<% end %>

<script>
  var config = {
    language: {
      id: '<%= @id %>',
      name: '<%= @language.name %>',
      fileExtension: '<%= @language.file_extension %>'
    },
    saveToLocalStorage: true,
    maxSimulationSpeed: 120, // time in ticks between each action
    images: {
      buoy: "<%= asset_path 'frank/buoy.gif' %>",
      ship: "<%= asset_path 'frank/ship.gif' %>",
      wave: "<%= asset_path 'frank/wave.gif' %>",
      treasure: "<%= asset_path 'frank/treasure.gif' %>",
      monster: "<%= asset_path 'frank/monster.gif' %>"
    },
    codemirror: {
      lineNumbers: true,
      autofocus: true,
      tabMode: 'spaces',
      enterMode: 'spaces',
      theme: 'monokai',
      keymap: 'sublime',
      styleActiveLine: true
    },
    lineColor: '#999',
    cellHighlighting: {
      hovered: 'rgba(0,0,0,0.1)',
      look: 'rgba(255,0,0,0.2)'
    },
    maxCodeLength: 10000
  };

  config = jQuery.extend(true, config, jQuery.parseJSON('<%= raw @language.gui_options.to_json %>'));
  window.Config = config

  var scripts = [
    "<%= javascript_path 'pirates/utilities' %>",
    "<%= javascript_path 'pirates/console' %>",
    "<%= javascript_path 'pirates/socketHandler' %>",
    "<%= javascript_path 'pirates/gameObjects' %>",
    "<%= javascript_path 'pirates/codegui' %>",
    "<%= javascript_path 'pirates/grid' %>"
  ];

  <% @language.script_assets.each do |script| %>
    scripts.push('<%= asset_path script %>');
  <% end %>
//  console.log('scripts to preload:', scripts);

  window.onload = function() { // wait until DOM is ready
    Simulation.preload(scripts, function() { // firefox won't draw without
      Simulation.initialize();
      Simulation.mainLoop();
    });

  }
</script>

{'fraction_non_alphanumeric': 0.1584456780333069, 'fraction_numerical': 0.006767116045466561, 'mean_word_length': 1.8032009484291642, 'pattern_counts': {'":': 16, '<': 434, '<?xml version=': 0, '>': 436, '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': '2202909', 'n_tokens_mistral': 5798, 'n_tokens_neox': 5359, 'n_words': 1112}