<commit_before><script>
x = new Sync("<?=site_url("wargame/fetch/");?>");
x.register("sentBreadcrumbs", function(breadcrumbs,data) {
//    return;

    $('svg g').remove();
    var lastUnit = '';
    var lastMoves = '';
    for(var unitId in breadcrumbs){
        var g = $('svg').append('<g class="unitPath'+unitId+'">');
        for(var moves in breadcrumbs[unitId]){
            var path = "";
            if(breadcrumbs[unitId][moves-0+1]){
                path += "<path stroke-width='15'";
            }else{
                path += "<path marker-end='url(#head)' stroke-width='15'";
            }
            var d = 'M'+breadcrumbs[unitId][moves].fromX+','+breadcrumbs[unitId][moves].fromY;
            d += ' L'+breadcrumbs[unitId][moves].toX+','+breadcrumbs[unitId][moves].toY;
            path += ' d="' + d + '"/>';
            var circle = '<circle cx="'+breadcrumbs[unitId][moves].toX+'" cy="'+breadcrumbs[unitId][moves].toY+'" r="7"/>';
            $('g.unitPath'+unitId).append(path);
            $('g.unitPath'+unitId).append(circle);
            lastMoves = moves;
        }

    }
    var svgHtml = $('#svgWrapper').html();
    $('#svgWrapper').html(svgHtml);
});

x.register("mapUnits", function(mapUnits) {
    var str;
    var fudge;
    var x,y;
    var beforeDeploy = $("#deployBox").children().size();
    DR.stackModel = {};
    DR.stackModel.ids = {};

    for (i in mapUnits) {
        width = $("#"+i).width();
        height = $("#"+i).height();
        x =  mapUnits[i].x;
        y = mapUnits[i].y;
        if(DR.stackModel[x] === undefined){
            DR.stackModel[x] = {};
        }
        if(DR.stackModel[x][y] === undefined){
            DR.stackModel[x][y] = {count:0,ids: {}};
        }
        fudge = 0;
        if(DR.stackModel[x][y].count){
            fudge = DR.stackModel[x][y].count * 4;
        }
        DR.stackModel[x][y].count++;
        var zIndex = DR.stackModel[x][y].count;
        /* really looking at the keys so the value can be the same */
        DR.stackModel[x][y].ids[i] = i;
        DR.stackModel.ids[i] = {x: x, y: y};

        if(mapUnits[i].parent != $("#"+i).parent().attr("id")){
            $("#"+i).appendTo($("#"+mapUnits[i].parent));
            if(mapUnits[i].parent != "gameImages"){
                debugger;
                $("#"+ i).css({top:"0"});
                $("#"+ i).css({left:"0"});
                if(!mapUnits[i].parent.match(/^gameTurn/)){
                    $("#"+ i).css({float:"left"});<commit_msg>var_dump left over<commit_after><script>
x = new Sync("<?=site_url("wargame/fetch/");?>");
x.register("sentBreadcrumbs", function(breadcrumbs,data) {
//    return;

    $('svg g').remove();
    var lastUnit = '';
    var lastMoves = '';
    for(var unitId in breadcrumbs){
        var g = $('svg').append('<g class="unitPath'+unitId+'">');
        for(var moves in breadcrumbs[unitId]){
            var path = "";
            if(breadcrumbs[unitId][moves-0+1]){
                path += "<path stroke-width='15'";
            }else{
                path += "<path marker-end='url(#head)' stroke-width='15'";
            }
            var d = 'M'+breadcrumbs[unitId][moves].fromX+','+breadcrumbs[unitId][moves].fromY;
            d += ' L'+breadcrumbs[unitId][moves].toX+','+breadcrumbs[unitId][moves].toY;
            path += ' d="' + d + '"/>';
            var circle = '<circle cx="'+breadcrumbs[unitId][moves].toX+'" cy="'+breadcrumbs[unitId][moves].toY+'" r="7"/>';
            $('g.unitPath'+unitId).append(path);
            $('g.unitPath'+unitId).append(circle);
            lastMoves = moves;
        }

    }
    var svgHtml = $('#svgWrapper').html();
    $('#svgWrapper').html(svgHtml);
});

x.register("mapUnits", function(mapUnits) {
    var str;
    var fudge;
    var x,y;
    var beforeDeploy = $("#deployBox").children().size();
    DR.stackModel = {};
    DR.stackModel.ids = {};

    for (i in mapUnits) {
        width = $("#"+i).width();
        height = $("#"+i).height();
        x =  mapUnits[i].x;
        y = mapUnits[i].y;
        if(DR.stackModel[x] === undefined){
            DR.stackModel[x] = {};
        }
        if(DR.stackModel[x][y] === undefined){
            DR.stackModel[x][y] = {count:0,ids: {}};
        }
        fudge = 0;
        if(DR.stackModel[x][y].count){
            fudge = DR.stackModel[x][y].count * 4;
        }
        DR.stackModel[x][y].count++;
        var zIndex = DR.stackModel[x][y].count;
        /* really looking at the keys so the value can be the same */
        DR.stackModel[x][y].ids[i] = i;
        DR.stackModel.ids[i] = {x: x, y: y};

        if(mapUnits[i].parent != $("#"+i).parent().attr("id")){
            $("#"+i).appendTo($("#"+mapUnits[i].parent));
            if(mapUnits[i].parent != "gameImages"){
                $("#"+ i).css({top:"0"});
                $("#"+ i).css({left:"0"});
                if(!mapUnits[i].parent.match(/^gameTurn/)){
                    $("#"+ i).css({float:"left"});
{'fraction_non_alphanumeric': 0.2246129097124472, 'fraction_numerical': 0.004826060727930827, 'mean_word_length': 2.1884615384615387, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 13, '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': '3656554', 'n_tokens_mistral': 1701, 'n_tokens_neox': 1705, 'n_words': 258}