<commit_before>//      Command.cpp
//

#include <vector>
#include <string>
#include "CommandAbstract.h"
#include "CommandFactory.h"
#include "Command.h"

CommandAbstract* CommandFactory::create(Player*, std::vector <std::string>)
{
    std::string cmd = commandFull[0];
    commandFull.erase(commandFull.begin());

    CommandAbstract* command;

    if (cmd.compare("talk") == 0) {
        if (!player->isConnected() || !player->connect()) {
            throw "A player must be connected to launch the command talk";
        }
        command = new CommandTalk();
    }
    else {
        return NULL;
    }

    command->setArgs(commandFull);
    command->setPlayer(player);
    return command;
}<commit_msg>arguments named<commit_after>//      Command.cpp
//

#include <vector>
#include <string>
#include "CommandAbstract.h"
#include "CommandFactory.h"
#include "Command.h"

CommandAbstract* CommandFactory::create(Player* &player, std::vector <std::string> commandFull)
{
    std::string cmd = commandFull[0];
    commandFull.erase(commandFull.begin());

    CommandAbstract* command;

    if (cmd.compare("talk") == 0) {
        if (!player->isConnected() || !player->connect()) {
            throw "A player must be connected to launch the command talk";
        }
        command = new CommandTalk();
    }
    else {
        return NULL;
    }

    command->setArgs(commandFull);
    command->setPlayer(player);
    return command;
}
{'fraction_non_alphanumeric': 0.1451388888888889, 'fraction_numerical': 0.002777777777777778, 'mean_word_length': 3.188953488372093, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 17, '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': '6769367', 'n_tokens_mistral': 428, 'n_tokens_neox': 418, 'n_words': 101}