<commit_before>var memoryManager = require('memoryManager')
var roleTower = require('roleTower')
var roleWorker = require('roleWorker')
var roleHarvester = require('roleHarvester')
var roleSpawner = require('roleSpawner')
var roleGeneralist = require('roleGeneralist')
var oldGc = require('garbageCollector')
var _ = require('lodash')

module.exports.loop = function () {

    // temp fix
    var ca = Game.creeps['London'];
    delete(ca.memory.assignedResource);
    delete(ca.memory.assignedStorage);
    var cb = Game.creeps['Keira'];
    delete(cb.memory.assignedResource);
    delete(cb.memory.assignedStorage);
    delete(Memory.assignments);

    Memory.home = 'W8N68';

    memoryManager.collect();
    memoryManager.updateStructureStore(Memory.home);
    memoryManager.updateResourceStore(Memory.home);

    oldGc.collect();

    roleSpawner.run();
    roleTower.run(Memory.home);

    for(var name in Game.creeps) {
	    var creep = Game.creeps[name];
	    switch (creep.memory.role) {
	        case 'worker':
	            roleWorker.run(creep);
	            break;
	        case 'harvester':
	            roleHarvester.run(creep);
	            break;
	        case 'generalist':
	            roleGeneralist.run(creep);
	            break;
	    }
    }
}
<commit_msg>end fix<commit_after>var memoryManager = require('memoryManager')
var roleTower = require('roleTower')
var roleWorker = require('roleWorker')
var roleHarvester = require('roleHarvester')
var roleSpawner = require('roleSpawner')
var roleGeneralist = require('roleGeneralist')
var oldGc = require('garbageCollector')
var _ = require('lodash')

module.exports.loop = function () {

    // temp fix
//    var ca = Game.creeps['London'];
//    delete(ca.memory.assignedResource);
//    delete(ca.memory.assignedStorage);
//    var cb = Game.creeps['Keira'];
//    delete(cb.memory.assignedResource);
//    delete(cb.memory.assignedStorage);
//    delete(Memory.assignments);

    Memory.home = 'W8N68';

    memoryManager.collect();
    memoryManager.updateStructureStore(Memory.home);
    memoryManager.updateResourceStore(Memory.home);

    oldGc.collect();

    roleSpawner.run();
    roleTower.run(Memory.home);

    for(var name in Game.creeps) {
	    var creep = Game.creeps[name];
	    switch (creep.memory.role) {
	        case 'worker':
	            roleWorker.run(creep);
	            break;
	        case 'harvester':
	            roleHarvester.run(creep);
	            break;
	        case 'generalist':
	            roleGeneralist.run(creep);
	            break;
	    }
    }
}

{'fraction_non_alphanumeric': 0.13182527301092042, 'fraction_numerical': 0.00234009360374415, 'mean_word_length': 2.9583333333333335, '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': '593693', 'n_tokens_mistral': 819, 'n_tokens_neox': 776, 'n_words': 135}