spell as in spell caster
while I gave this class the ability to tell times you can similarly
add other capabilities for fast activation.

input trigger sentence, output trigger result alg
for example
what is the time : 6:45

DSpeller

Code:



import java.util.ArrayList;

public class DSpeller extends AbsCmdReq implements Neuronable {
    private String param;
    private Boolean active;

    @Override
    public void output(Neuron noiron) {
        if (this.active) {
            APSpell maho = new APSpell(this.param);
            ArrayList<AbsAlgPart> algParts1 = new ArrayList<>();
            algParts1.add(maho);
            Algorithm algorithm = new Algorithm("spell", this.param, algParts1);
            noiron.algParts.add(algorithm);
        }
    }

    @Override
    public void input(String command) {
        // TODO Auto-generated method stub
        switch (command) {
            case "what is the time":
            case "what is the date":
            case "what is the year":
            case "current seconds":
            case "current minutes":
            case "current hour":
            case "which day is it":
            case "greet":
                active = true;
                this.param = command;
                break;
            default:
                active = false;
                break;

        }
    }

}


this skill is very useful for programming course home work, and stuff

👮 :cop3: :cop2: 🤷