battle programming a forum for elite programmers with extreme will power to sharpen theire skills
 
HomeCalendarFAQSearchMemberlistUsergroupsRegisterLog in
Post new topic   Reply to topicShare
 

 DHungry skill ver3

Go down 
AuthorMessage
Moti Barski

Moti Barski

Posts : 330
Join date : 2011-08-02

DHungry skill ver3 Empty
PostSubject: DHungry skill ver3   DHungry skill ver3 EmptyFri Jul 12, 2019 9:59 pm

are you hungry
will result in her telling if she is hungry

also she will automatically inform you if and how much hungry she is :

DHungry class (java) :

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 String reply = "";
   private int powerLv = 100;
   private int threshHold = 60;
   private RegexUtil regexUtil = new RegexUtil();

   @Override
   public void output(Neuron noiron) {
      // TODO Auto-generated method stub
      if (reply != "") {
         AbsAlgPart itte = new APSay(1, reply);
         AbsAlgPart itte2 = new APSay(1, "shiku shiku");
         String representation = "hungry reply";
         ArrayList<AbsAlgPart> algParts1 = new ArrayList<>();
         algParts1.add(itte);
         if (reply.equals("i am hungry")) {
            algParts1.add(itte2);
         }

         Algorithm algorithm = new Algorithm("hungry reply", representation, algParts1);
         noiron.algParts.add(algorithm);
         reply = "";
         return;
      }
      if (powerLv > 90) {
         threshHold = 60;
      }
      if (powerLv < threshHold) {
         threshHold = ((powerLv / 10)) * 10;
         AbsAlgPart itte = new APSay(1, "I am hungry power level" + threshHold);
         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 ear, String skin, String eye) {
      // TODO Auto-generated method stub
      if (ear.contains("are you hungry")) {
         if (powerLv < 91) {
            reply = "i am hungry";
         } else if (powerLv > 90) {
            reply = "power level over 90";
         }
         return;
      }
      String myString = regexUtil.regexChecker("(\\d+)(?= charge)", skin);
      if (myString != "") {
         powerLv = Integer.parseInt(myString);
      }
   }

}
MainActivity kotlin : (gets b8Tri power level) :

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 String reply = "";
   private int powerLv = 100;
   private int threshHold = 60;
   private RegexUtil regexUtil = new RegexUtil();

   @Override
   public void output(Neuron noiron) {
      // TODO Auto-generated method stub
      if (reply != "") {
         AbsAlgPart itte = new APSay(1, reply);
         AbsAlgPart itte2 = new APSay(1, "shiku shiku");
         String representation = "hungry reply";
         ArrayList<AbsAlgPart> algParts1 = new ArrayList<>();
         algParts1.add(itte);
         if (reply.equals("i am hungry")) {
            algParts1.add(itte2);
         }

         Algorithm algorithm = new Algorithm("hungry reply", representation, algParts1);
         noiron.algParts.add(algorithm);
         reply = "";
         return;
      }
      if (powerLv > 90) {
         threshHold = 60;
      }
      if (powerLv < threshHold) {
         threshHold = ((powerLv / 10)) * 10;
         AbsAlgPart itte = new APSay(1, "I am hungry power level" + threshHold);
         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 ear, String skin, String eye) {
      // TODO Auto-generated method stub
      if (ear.contains("are you hungry")) {
         if (powerLv < 91) {
            reply = "i am hungry";
         } else if (powerLv > 90) {
            reply = "power level over 90";
         }
         return;
      }
      String myString = regexUtil.regexChecker("(\\d+)(?= charge)", skin);
      if (myString != "") {
         powerLv = Integer.parseInt(myString);
      }
   }

}


lol! don't worry I fed her

_________________
MB over and out emp it up
Back to top Go down
View user profile
 
DHungry skill ver3
Back to top 
Page 1 of 1

Permissions in this forum:You can reply to topics in this forum
battle programmers alliance :: battle programming alliance :: the LivinGrimoire-
Post new topic   Reply to topicJump to: