Code:
import java.util.ArrayList;
public class DHungry extends AbsCmdReq implements Neuronable {
// basic skill created, lets add it to the living grimoire :D
/*
* this is some new skill I made for the MGTOW Artificial General Intelligence
* this agi platform enables the programmer to finish a project with one code
* line by simply adding the skill new skills are published to the site, pick
* skills and add them to your agi instance ok so watch how easy it is
*/
private int powerLv;
private int threshHold = 60;
private RegexUtil regexUtil = new RegexUtil();
@Override
public void output(Neuron noiron) {
// TODO Auto-generated method stub
if (powerLv > 90) {
threshHold = 60;
}
if (powerLv < threshHold) {
threshHold = ((powerLv / 10) - 1) * 10;
AbsAlgPart itte = new APSay(1, "I am hungry power level at" + powerLv + " percent");
String representation = "hungry";
ArrayList<AbsAlgPart> algParts1 = new ArrayList<>();
algParts1.add(itte);
Algorithm algorithm = new Algorithm("eat", representation, algParts1);
noiron.algParts.add(algorithm);
}
}
@Override
public void input(String command) {
// TODO Auto-generated method stub
String myString = regexUtil.regexChecker("(\\d+)(?= charge)", command);
if (myString != "") {
powerLv = Integer.parseInt(myString);
}
}
}
not done with this one yet. :grimoire: