<commit_before>import { IQuadrant, QuadsKeepr } from "quadskeepr";

import { EightBittr } from "../EightBittr";
import { IThing } from "../IEightBittr";

export const createQuadsKeeper = (eightBitter: EightBittr) => {
    const quadrantWidth: number = eightBitter.settings.width / 6;
    const quadrantHeight: number = eightBitter.settings.height / 6;

    return new QuadsKeepr<IThing>({
        groupNames: eightBitter.groups.groupNames,
        onAdd: (direction: string, top: number, right: number, bottom: number, left: number): void => {
            eightBitter.maps.onAreaSpawn(direction, top, right, bottom, left);
        },
        onRemove: (direction: string, top: number, right: number, bottom: number, left: number): void => {
            eightBitter.maps.onAreaUnspawn(direction, top, right, bottom, left);
        },
        quadrantFactory: (): IQuadrant<IThing> => eightBitter.objectMaker.make<IQuadrant<IThing>>("Quadrant"),
        quadrantHeight,
        quadrantWidth,
        startLeft: -quadrantWidth,
        startTop: -quadrantHeight,
        ...eightBitter.settings.components.quadsKeeper,
    });
};
<commit_msg>Also added numCols and numRows to createQuadsKeeper<commit_after>import { IQuadrant, QuadsKeepr } from "quadskeepr";

import { EightBittr } from "../EightBittr";
import { IThing } from "../IEightBittr";

export const createQuadsKeeper = (eightBitter: EightBittr) => {
    const numCols = 6;
    const numRows = 6;
    const quadrantHeight: number = eightBitter.settings.height / numCols;
    const quadrantWidth: number = eightBitter.settings.width / numRows;

    return new QuadsKeepr<IThing>({
        groupNames: eightBitter.groups.groupNames,
        numCols,
        numRows,
        onAdd: (direction: string, top: number, right: number, bottom: number, left: number): void => {
            eightBitter.maps.onAreaSpawn(direction, top, right, bottom, left);
        },
        onRemove: (direction: string, top: number, right: number, bottom: number, left: number): void => {
            eightBitter.maps.onAreaUnspawn(direction, top, right, bottom, left);
        },
        quadrantFactory: (): IQuadrant<IThing> => eightBitter.objectMaker.make<IQuadrant<IThing>>("Quadrant"),
        quadrantHeight,
        quadrantWidth,
        startLeft: -quadrantWidth,
        startTop: -quadrantHeight,
        ...eightBitter.settings.components.quadsKeeper,
    });
};

{'fraction_non_alphanumeric': 0.12282157676348547, 'fraction_numerical': 0.0016597510373443983, 'mean_word_length': 3.3130590339892665, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 19, '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': '251114', 'n_tokens_mistral': 751, 'n_tokens_neox': 748, 'n_words': 168}