<commit_before>/* The actual code!
 */
function QuadsKeepr(settings) {
    "use strict";
    if (!this || this === window) {
        return new QuadsKeepr(settings);
    }
    var self = this,
        
        // The ObjectMakr factory used to create Quadrant objects
        ObjectMaker,
        
        // Function used to create a canvas of a given width and height
        getCanvas,

        // Quadrants, listed as a raw array
        quadrants,

        // Quadrants, listed by columns
        columns,

        // How many quadrants, rows, and cols
        num_quads,
        num_rows,
        num_cols,

        // Sizes of the entire screen
        screen_width,
        screen_height,

        // Sizes of each each quadrant
        quad_width,
        quad_height,

        // How far off from a quadrant will still count as being in it
        tolerance,

        // When to delete a column
        delx,

        // How far to the right the spawning column should go
        out_difference,

        // The left- and right-most quads (for delx checking)
        leftmost,
        rightmost,

        // Names under which external Things should store Quadrant information
        thing_left,
        thing_top,
        thing_right,
        thing_bottom,
        thing_num_quads,
        thing_max_quads,
        thing_quadrants,
        thing_changed,
        thing_group_name,
        
        // An Array of string names a Thing may be placed into 
        group_names,

        // Callbacks for...
        onUpdate, // when Quadrants are updated
        onCollide; // when two Things touch (not used... yet!)

    self.reset = function reset(settings) {
        quadrants = [];
        columns = [];
        
        ObjectMaker = settings.ObjectMaker;
        
        getCanvas = settings.getCanvas;

        num_rows = settings.num_rows;
        num_cols = settings.num_cols;
        num_quads = num_rows * num_cols;

        screen_width = settings.screen_width || 640;
        screen_height = settings.screen_height || 480;

        quad_width = screen_width / (num_cols - 3);
        quad_height = screen_height / (num_rows - 2);

        tolerance = settings.tolerance || 0;
        delx = settings.delx || quad_width * -2;
        out_difference = quad_width;

        thing_left = settings.thing_left || "left";
        thing_right = settings.thing_right || "right";
        thing_top = settings.thing_top || "top";
        thing_bottom = settings.thing_bottom || "bottom";
        thing_num_quads = settings.thing_num_quads || "numquads";
        thing_max_quads = settings.thing_max_quads || "maxquads";
        thing_quadrants = settings.thing_quadrants || "quadrants";
        thing_changed = settings.thing_changed || "changed";
        thing_group_name = settings.thing_group_name || "group";
        
        group_names = settings.group_names;

        onUpdate = settings.onUpdate;
        onCollide = settings.onCollide;

        self.resetQuadrants();
    }<commit_msg>Fix for quadrant canvas black lines<commit_after>/* The actual code!
 */
function QuadsKeepr(settings) {
    "use strict";
    if (!this || this === window) {
        return new QuadsKeepr(settings);
    }
    var self = this,
        
        // The ObjectMakr factory used to create Quadrant objects
        ObjectMaker,
        
        // Function used to create a canvas of a given width and height
        getCanvas,

        // Quadrants, listed as a raw array
        quadrants,

        // Quadrants, listed by columns
        columns,

        // How many quadrants, rows, and cols
        num_quads,
        num_rows,
        num_cols,

        // Sizes of the entire screen
        screen_width,
        screen_height,

        // Sizes of each each quadrant
        quad_width,
        quad_height,

        // How far off from a quadrant will still count as being in it
        tolerance,

        // When to delete a column
        delx,

        // How far to the right the spawning column should go
        out_difference,

        // The left- and right-most quads (for delx checking)
        leftmost,
        rightmost,

        // Names under which external Things should store Quadrant information
        thing_left,
        thing_top,
        thing_right,
        thing_bottom,
        thing_num_quads,
        thing_max_quads,
        thing_quadrants,
        thing_changed,
        thing_group_name,
        
        // An Array of string names a Thing may be placed into 
        group_names,

        // Callbacks for...
        onUpdate, // when Quadrants are updated
        onCollide; // when two Things touch (not used... yet!)

    self.reset = function reset(settings) {
        quadrants = [];
        columns = [];
        
        ObjectMaker = settings.ObjectMaker;
        
        getCanvas = settings.getCanvas;

        num_rows = settings.num_rows;
        num_cols = settings.num_cols;
        num_quads = num_rows * num_cols;

        screen_width = settings.screen_width || 640;
        screen_height = settings.screen_height || 480;

        quad_width = (screen_width / (num_cols - 3)) | 0;
        quad_height = (screen_height / (num_rows - 2)) | 0;

        tolerance = settings.tolerance || 0;
        delx = settings.delx || quad_width * -2;
        out_difference = quad_width;

        thing_left = settings.thing_left || "left";
        thing_right = settings.thing_right || "right";
        thing_top = settings.thing_top || "top";
        thing_bottom = settings.thing_bottom || "bottom";
        thing_num_quads = settings.thing_num_quads || "numquads";
        thing_max_quads = settings.thing_max_quads || "maxquads";
        thing_quadrants = settings.thing_quadrants || "quadrants";
        thing_changed = settings.thing_changed || "changed";
        thing_group_name = settings.thing_group_name || "group";
        
        group_names = settings.group_names;

        onUpdate = settings.onUpdate;
        onCollide = settings.onCollide;

        self.resetQuadrants();
    }
{'fraction_non_alphanumeric': 0.08269930532583526, 'fraction_numerical': 0.0036387694343367515, 'mean_word_length': 1.910009624639076, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4094653', 'n_tokens_mistral': 1743, 'n_tokens_neox': 1654, 'n_words': 475}