<commit_before>package parser.commands;

import core.Player;
import core.Map;
import core.Utilities;
import core.WObject;
import constructs.Conversation;
import constructs.Room;

//
// Command Say to say something. If in a conversation used to communicate,
// otherwise treated like echo
//
// @author <NAME> <<EMAIL>>
//
public class Say extends WObject implements Command {

    //constructor
    public Say(String name, String description) {
        super(name, description);
    }

    //Say something!
    public void invoke(WObject idx, WObject target, Player p, Map m) {
        if (target instanceof Conversation) {
            Conversation currConvo = (Conversation) target;

            if (currConvo.getNumOptions() != 0 ) {
                try {
                    int index = Integer.parseInt(idx.getDescription(), 10);
                    currConvo.getOptions().get(0).startConversation();
                    currConvo.getOptions().get(0).invoke(currConvo.getOwner(),p);
                }
                catch(NumberFormatException e) {
                    Utilities.println("You don't know how to say \""+idx.getDescription()+"\"");        
                }<commit_msg>started say command update<commit_after>package parser.commands;

import core.Player;
import core.Map;
import core.Utilities;
import core.WObject;
import constructs.Conversation;
import constructs.Room;

//
// Command Say to say something. If in a conversation used to communicate,
// otherwise treated like echo
//
// @author <NAME> <<EMAIL>>
//
public class Say extends WObject implements Command {

    //constructor
    public Say(String name, String description) {
        super(name, description);
    }

    //Say something!
    public void invoke(String[] parts, Player p, Map m) {
        if (target instanceof Conversation) {
            Conversation currConvo = (Conversation) target;

            if (currConvo.getNumOptions() != 0 ) {
                try {
                    int index = Integer.parseInt(idx.getDescription(), 10);
                    currConvo.getOptions().get(0).startConversation();
                    currConvo.getOptions().get(0).invoke(currConvo.getOwner(),p);
                }
                catch(NumberFormatException e) {
                    Utilities.println("You don't know how to say \""+idx.getDescription()+"\"");        
                }
{'fraction_non_alphanumeric': 0.11069023569023569, 'fraction_numerical': 0.004208754208754209, 'mean_word_length': 2.2831491712707184, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '1274410', 'n_tokens_mistral': 635, 'n_tokens_neox': 602, 'n_words': 175}