<commit_before>let mod = new ActionObj('Guard');
module.exports = mod;

mod.nextTarget = function() {
    const sortHostiles = Util.Defense.sortHostilesByPos(creep.room, creep.pos);
    return sortHostiles.length ?
    　　Game.getObjectById(_.last(sortHostiles).id) : false;
};

mod.loop = function(creep) {
    return this.loop0(creep, (creep, target) => {
        creep.moveTo(target, {visualizePathStyle: {stroke: '#ffffff'}});
        creep.attack(target);
    });
};<commit_msg>fixed creep is undefined issue<commit_after>let mod = new ActionObj('Guard');
module.exports = mod;

mod.nextTarget = function() {
    const creep = this.creep;
    const sortHostiles = Util.Defense.sortHostilesByPos(creep.room, creep.pos);
    return sortHostiles.length ?
    　　Game.getObjectById(_.last(sortHostiles).id) : false;
};

mod.loop = function(creep) {
    return this.loop0(creep, (creep, target) => {
        creep.moveTo(target, {visualizePathStyle: {stroke: '#ffffff'}});
        creep.attack(target);
    });
};
{'fraction_non_alphanumeric': 0.1533135509396637, 'fraction_numerical': 0.0019782393669634025, 'mean_word_length': 4.00990099009901, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '4781567', 'n_tokens_mistral': 343, 'n_tokens_neox': 340, 'n_words': 61}